This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...
The idea is this: you take a job that you'd rather not do manually, and describe it to babushka...
Then /^I should get a response with status (\d+)$/ do |status| response.status.should include(status) end Capybara Then /^I should...
This card describes a Cucumber step that lets you say: When I perform basic authentication as "username/password" and I visit...
Update: This trick probably isn't very useful anymore in Ruby 2.x. The Ruby GC has improved a lot...
If you’re testing the behavior of deprecated code in your Ruby project, the warning messages littered throughout your spec...
Git allows you to do a binary search across commits to hunt down the commit that introduced a bug.
These steps are now part of Spreewald. The step definitions below allow you to test the filename suggested by the...
The step definitions below allow you to write this in both Webrat and Capybara: When I follow "Download as PDF...
Our collection of the most useful Cucumber steps, Spreewald, now supports exact matching of form fields and lets you use...
When you need to see the content of a page (i.e. not all the HTML but the relevant text body...
You can use these step definitions: Then /^I should not see an error$/ do (200 .. 399).should include(page.status_code...
RSpec 1, RSpec 2 To test whether two arrays have the same elements regardless of order, RSpec 1 and 2...
When you just went through a long debug-fest and infested your code with dozens of debug messages, it can...
Plugins (and gems) are typically tested using a complete sample rails application that lives in the spec folder of the...
This step tests whether a given select option comes preselected in the HTML. There is another step to test that...
This note describes a Cucumber step definition that lets you test whether or not a CSS selector is present on...
Sometimes you inherit a non Rails or non Rack based web app such as PHP, Perl, Java / JEE, etc. I...
These steps are now part of Spreewald. This note describes a Cucumber step that lets you write this:
Both these approaches will keep your GET parameters – and will only work for GET requests. Capybara: When /^I reload the...
power-rake db:migrate VERSION=20100913132321 By default the environments development, test, cucumber and performance are considered...
You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you...
When submitting textareas, browsers sometimes include carriage returns (\r) instead of just line feeds (\n) at the end of each...
When a spec only runs when it is called directly, but not as part of the whole test suite, make...