The step definition below lets you say: Then I should see a field "Password" But I should not see a...
In order to chain greps on log files that are opened via tail -f test.log you have to use the...
The following snippet demonstrates how you could create excel files (with spreadsheet gem) and format columns so that they follow...
Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.
In cucumber you are able to run features in whatever directory you like. This also includes executing features in subdirectories...
Our rcov:all task for aggregated RSpec/Cucumber coverage was overhauled extensively. Among other things it now works for Rails 2...
Code coverage is the ratio of code lines kissed by a test vs. the total number of lines in your...
When internationalizing your Rails app, you'll be replacing strings like 'Please enter your name' with t('.name_prompt'). You...
When you use google analytics to track your visitors interactions, you should ensure that it runs on your production site...
Instead of running all missing migrations on your test database with rake db:migrate RAILS_ENV=test you can also...
When using state_machine you sometimes need to know whether an object may execute a certain transition. Let's take...
To show the collation of your tables you have to login to the MySQL console and execute SHOW TABLE STATUS...
The Rails logger will store its content in a buffer and write it into the file system every 1000 lines...
When your Cucumber feature seems to forget cookies / sessions when you run it with Selenium check if the test travels...
Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...
Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...
You can use the step definition below to say this: Then the "Last name" field should have an error
There is a bug in Rails 3's dbconsole script, which makes the following command open a database console for...
Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...
tl;dr: Always have your attachment path start with :rails_root/storage/#{Rails.env}#{ENV['RAILS_TEST_NUMBER']}/. The directory where you...
Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and...
Sometimes you need a file of some size (possibly for testing purposes). On Linux, you can use dd to create...
These steps are now part of Spreewald. Since Capybara 0.4.1 a within scope will only look at the first element...
The step definition below allows you to write: Then I should see a link labeled "Foo" But I should not...