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...
In RSpec 2 shared_examples_for can have parameters. You can simply hand over arguments from it_behaves...
When you need to see the content of a page (i.e. not all the HTML but the relevant text body...
Using this step definition you can check if any form field (text field, checkbox, etc) or button is disabled:
You can usually just use the eq matched to compare two numbers: expect(deal.total).to eq(120)
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...
Don't insert table rows in a Rails database migration. This will break tests that expect that database to be...
In order to go back one page in your Cucumber tests, you can use the following step definition for Capybara...
Selenium has been the siren song that continually calls out to us. Unfortunately, in practice we’ve been unable to...
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...
Terminus is a Capybara driver where most of the driver functions are implemented in client-side JavaScript. It lets you...
Sometimes you inherit a non Rails or non Rack based web app such as PHP, Perl, Java / JEE, etc. I...
You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to...
Sometimes the order in which strings appear on a page matters to you. Spreewald gives you steps like these:
Capybara's has_css? matcher has a couple of options you might find useful. Check that a selector appears a...
Inside before :each blocks you can refer to variables that you introduce via let later on. They do not need...