TL;DR Debugging problems with javascript errors in cucumber tests is sometimes easier in the browser. Run the test, stop...

web.archive.org

xargs is a powerful bash tool that can take input from $STDIN and pass it to a given command. I.e...

github.com

When running tests via parallel_tests, you may encounter an error: cannot load such file -- parallel_tests/gherkin/runtime_logger Error creating formatter...

There is no CSS selector for matching elements that contains a given string ¹. Luckily, Capybara offers the :text option to...

makandra dev
web.archive.org

When testing your command line application with Aruba, you might need to stub out other binaries you don't want...

When you're writing specs for ActiveRecord models that use memoization, a simple #reload will not do: it 'updates on...

clipboardjs.com

We used zeroclipboard.js in some of our projects but now we switched to clipboard.js because it does not rely on...

We often use VCR to stub external APIs. Unfortunately VCR can have problems matching requests to recorded cassettes, and these...

github.com

We have released a new library Gemika to help test a gem against multiple versions of Ruby, gem dependencies and...

Same requests are recorded only once in vcr. Replaying a test fails, if you trigger the same request multiple times...

Similar to our snippet that runs all Cucumber features matching a given string, the following will run all modified or...

makandra dev
github.com

Improve geordi cucumber: Only attempt @solo run when the specified files contain the @solo tag, skip @solo run if any...

Capistrano is by default configured to exclude the gems of the groups development and test when deploying to the stages...

You want Spring for super-fast binstubs like bin/rails or bin/rspec which avoid Rails boot time. You want parallel_tests...

Sometimes you want to test migrations with production or staging data. Dumping single tables makes sense if a complete dump...

When you're nesting setTimeout(f, 0) calls, your browser will silently increase the delay to 5 milliseconds after the...

When your controller action raises an unhandled exception, Rails will look at the exception's class and choose an appropriate...

Resources Rails Guide: Internationalization API Guide to localizing a Rails application Locale-aware helpers in ActionView::Helpers::NumberHelper

When building a web application, one is tempted to claim it "done" too early. Make sure you check this list...

makandra dev
phrogz.net

...The and tags both come with some non-default behavior that you know from other tags.

The following will search for all .feature files containing a search term and run them using geordi. find features/ -name...

Reading user input in console applications is usually done using Kernel#gets. Stubbing that can be a bit hairy.

When testing Ruby code that prints something to the terminal, you can test that output. Since RSpec 3.0 there is...

willmore.eu

The linked site hosts a simple test. It shows two images with narrow vertical/horizontal lines. The more they resemble each...