When a has_many association basically serves to store a list of associated strings (tags, categories, ...), it can be convenient...
When you just went through a long debug-fest and infested your code with dozens of debug messages, it can...
Occasionally some complex query must be processed on the database because building thousands of Ruby objects is impracticable.
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...
For clarity and traceability, your commit messages should include the ID and title of the Pivotal Tracker story you're...
The following initializer provides an :alias => "my_route_name" option to restful routes in your route.rb. This simply makes the...
This note describes a Cucumber step definition that lets you test whether or not a CSS selector is present on...
Ctrl + R Search commands you entered previously. Press Ctrl + R again to search further back, Ctrl + Shift + R searches forward...
Sometimes you inherit a non Rails or non Rack based web app such as PHP, Perl, Java / JEE, etc. I...
If a controller action responds to other formats than HTML (XML, PDF, Excel, JSON, ...), you can reach that code in...
You will need to upgrade to RSpec >= 2 and rspec-rails >= 2 for Rails 3. Here are some hints to...
If you previously used version 2.x of Thunderbird and upgraded to 3.x (for example through an Ubuntu release...
If you did file operations inside a shell or for example using Nautilus, it can take quite a while until...
Take care when trying to set attributes to nil in a blueprint. Given the following master blueprint: Story.blueprint do
Sometimes the order in which strings appear on a page matters to you. Spreewald gives you steps like these:
Note: We are talking about Machinist 1 here, Machinist 2 may have solved this or might require a different approach...
If you want to see how long your database queries actually take, you need to disable MySQL's query cache...
Even when you're using bundler, it might be significant in which order your gems are listed in your Gemfile...
Inside before :each blocks you can refer to variables that you introduce via let later on. They do not need...
If a SSH shell dies (from timeout for example), you cannot kill it with the usual CTRL-C or CTRL...
These steps are now part of Spreewald. This note describes a Cucumber step that lets you write this:
A popular ruby idiom I keep stumbling upon is def do_some_thing_for(values) values = Array(values) values.each { … }
Both these approaches will keep your GET parameters – and will only work for GET requests. Capybara: When /^I reload the...