Situation: You want to write a spec for a function inside an Angular service. This function at some point makes...
By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...
PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02...
In most projects I know, Cucumber test suite speed is not an issue. Of course, running 350 features takes its...
Requestb.in is a webservice that gives you a temporary URL you can use to test request. The page will automatically...
We're usually running Ubuntu LTS versions. Sometimes newer hardware requires packages from more recent Ubuntu releases that only come...
Checking if a JavaScript value is of a given type can be very confusing: There are two operators typeof and...
RSpec allows you to mark a single Example/ExampleGroup so that only this will be run. This is very useful when...
When an Rspec example fails, I usually investigate by running that example again using rspec . However, this does not work...
You are not using javascript tests The file is served from a public folder (not via controller) Problem description...
An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...
Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...
You need to disable "Bluetooth low energy", then follow these core steps: Make sure the headphones are in pairing mode...
Use return to return from a method. return accepts a value that will be the return value of the...
There are many approaches out there how you can import data from a legacy application to a new application. Here...
Native promises have no methods to inspect their state. You can use the promiseState function below to check whether a...
You can not use the hash_including argument matcher with a nested hash: describe 'user' do let(:user) { {id: 1...
Webpack is the future. We're using it in our latest Rails applications. For tests, we want to compile assets...
I needed to make sure that an element is visible and not overshadowed by an element that has a higher...
This card will show you a cool way to define a class using Struct.new. A common usecase for Structs are...
Rails default config uses the ActiveSupport::Cache::NullStore and disables controller caching for all environments except production: config.action_controller.perform_caching = false...
Shoulda Matchers don't provide canditional validations (validations with if: option). Here is how to write tests for the condition...
When you have a multi-server setup, you'll be adding a new server from time to time. Before doing...
Middleman is a static page generator that brings many of the goodies that Rails developers are used to.