When you have a pending Cucumber step (or feature) that also uses an existing VCR cassette, your pending test may...
This cucumber step is useful for testing an image (looking at the src of the image). Then(/^I should see...
To check which elements an ActiveRecord relation contains use the contain_exactly matcher. describe User do let!(:admin) { create(:user...
This is a small example on how you can check if your Postgres index can be used by a specific...
The issue: You are using stub_const to change a constant value for your test. stub_const "SomeClass::CONST", 'test...
This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.
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...