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...
If you want to play music or sounds from a browser, your choice is to use either Flash or the...
User Stories should describe what a user wants the system to do. Purely technical tasks should usually be implemented as...
We can now plug into every facet of the Rails jQuery UJS adapter, binding to custom events, and even customizing...
If you want to have a new log file every day automatically, but avoid using logrotate, the CustomLog directive is...
ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...
It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let...
If you want to manually check if e-mail delivery works on a machine by sending an e-mail you...
When you write a custom RSpec matcher a good place to store them is to create one file per matcher...
To test whether a hash includes an expected sub-hash: expect(user.attributes).to match(hash_including('name' => 'Bruce Wayne'))
Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2
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...
When you click a link or a press a button on a Selenium-controlled browser, the call will return control...
Adds a slide out panel to your Rails application that directs clients to test stories that have been marked as...
jQuery offers many different methods to move a selection through the DOM tree. These are the most important: $element.find(selector...
So you are comparing two Time objects in an RSpec example, and they are not equal, although they look equal...
In order to cover some edge cases you rarely care about, Range#include? will become very slow in Ruby 1.9...