Introduction Mixins are a very powerful feature in Ruby, but knowing how to test them is sometimes not too obvious, especially to beginners. This stems from mixins’ nature – they get mixed into other classes. In this tutorial, we will revisit what mixins are, identify mixin types, and learn how we can test mixins with […]
Category Software Engineering
Testing Python-Requests with Betamax
Introduction Requests is one of the most downloaded and widely used Python libraries published on PyPI. Testing Requests, however, is something that most people attempt to avoid, or do only by using mocks and hand-written or hand-copied response data. VCRpy and Betamax are two libraries that avoid using mocks and hand-written or hand-copied data, and […]
Stubbing External Services in Rails
Intro Integrating external services in web applications has been around for a long time now. We often use various OAuth providers such as Facebook, Twitter, GitHub and other alternatives for user signup, depending on our needs. Other times, things are more complicated. Maybe we are using Stripe or PayPal for online payments, or maybe we […]
Test-Driven APIs with Phoenix and Elixir
Introduction Starting with a new technology can be difficult. It usually takes some time to understand the components and the way they work together. In this tutorial, we’re going to create an API, using Test Driven Development (TDD) to guide us through its implementation. You’ll learn how the feedback provided by our test helps save […]
Building and Deploying Microservices with AWS Lambda and Semaphore
AWS Lambda is a service from the Amazon Web Services family which runs your code based on various events. When you create a Lambda function and deploy your code to it, AWS Lambda takes care of provisioning and managing servers that run your code. This tutorial will show you how to develop a Node.js Lambda […]
Fast Continuous Delivery of Microservices with AWS Lambda
AWS Lambda is an AWS service that runs your code in response to events or HTTP requests. Lambda works through functions, which are basically microservices written in Java, Python or Node.js. When you create a Lambda function and deploy your code to it, AWS Lambda takes care of provisioning and managing the backend infrastructure. To […]
Node.js Version Usage in Commercial Projects, 2015 Edition
Weβve been publishing Ruby version reports in commercial projects for three years now, and given recent events in Node community
How to Deploy a Node.js Application to Elastic Beanstalk with Semaphore
Introduction With AWS Elastic Beanstalk, you can quickly deploy and manage applications in the AWS cloud without having to worry about the infrastructure that supports those applications. AWS Elastic Beanstalk automatically handles all the details of application version history, capacity provisioning, load balancing, scaling, and application health monitoring. This tutorial explains how to set up […]
Best Practices for Spies, Stubs and Mocks in Sinon.js
Introduction Testing code with Ajax, networking, timeouts, databases, or other dependencies can be difficult. For example, if you use Ajax or networking, you need to have a server, which responds to your requests. With databases, you need to have a testing database set up with data for your tests. All of this means that writing […]
Ruby Version Usage in Commercial Projects, 2015 Edition
Continuing our modest tradition of publishing an annual report on Ruby versions used for private projects on Semaphore, we’re presenting you with the results for 2015.
Getting Started with Minitest
What is Minitest? Minitest is a testing tool for Ruby that provides a complete suite of testing facilities. It also supports behaviour-driven development, mocking and benchmarking. With the release of Ruby 1.9, it was added to Ruby’s standard library, which increased its popularity. Even though at first it gives off the impression of a very […]
Behavior-Driven Rails 5 API for an Ember.js Application
Test Driving an Ember Application Welcome back! If this is the first tutorial on Ember.js you are reading on Semaphore Community, it’s recommended that you first read Part 1, where we laid the groundwork with Ember and created some client-side models. In this tutorial, we’re taking a little break from Ember and looking at building […]
Setting Up a BDD Stack on a Django Application
Introduction This tutorial will guide you through installing behave_django and FactoryBoy to set up a BDD stack for a Django application. For this purpose, we will create a simple login form as a base for developing BDD tests. BDD puts the user at the center of your tests. It is an increasingly popular method that […]
Introduction to Verifying Doubles in RSpec
Introduction Testing is probably one of the most popular topics in the Rails community today. This is because we are yet to get to the point where testing has the same wow factor like the other parts of Rails. The problem with testing and writing Rails code is that we canβt quite get the separation […]
On Bootstrapping a New Product
This time we had the pleasure of talking with Pedro Pereira Santos, team leader at Rupeal, a Portuguese company that has two completely bootstraped products behind them.