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...
To test if you can connect to a host using password authentication and explicitly deny public key authentication:
My RubyMine (and it seems like many other Java GUI applications) crashes the Compiz window decorator almost every time on...
geordi, our collection of awesome shell scripts, has been extended by three scripts to help you call RSpec or Cucumber...
When using the resource_controller gem you often hook onto events like this: update.before do do_something end
When your cucumber features grow massively over time, the test execution can take a lot of time.
Wrapping a string in this class gives you a prettier way to test for equality.
This is an awful way to test whether a number is shown on the screen: Then I should see "5...
Capybara allows you to select DOM elements, e.g. by using field, find_field(...) or field_labeled(...): role_select = field_labeled...
Sometimes PDF cucumber tests fail at the first test run and succeed at the second run. You can fix this...
When you want to quickly boot from a drive or image in a virtual machine you do not need to...
User Stories should describe what a user wants the system to do. Purely technical tasks should usually be implemented as...
ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...
If you want to manually check if e-mail delivery works on a machine by sending an e-mail you...
To test whether a hash includes an expected sub-hash: expect(user.attributes).to match(hash_including('name' => 'Bruce Wayne'))
We are maintaining some vintage projects with tests written in Test::Unit instead of RSpec. Mocks and stubs are not...
You will occasionally need to clean out your database while keeping the schema intact, e.g. when someone inserted data in...