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...

makandra dev

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:

makandra dev

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...

RSpec's context (which is basically an alias for describe) takes over your whole application. No object may have its...

You can use record.send(:update_without_callbacks) or record.send(:create_without_callbacks) This can be used as a...

We use RTeX for PDF exports. While converting LaTeX to PDF, RTeX opens a temporary file which has problematic permissions...

web.archive.org

With its you can switch the subject of an example to a method value of the current subject: describe Array...

Find conditions for scopes can be given either as an array (:conditions => ['state = ?', 'draft']) or a hash (:conditions => { 'state' => 'draft...

youtube.com

power-rake db:migrate VERSION=20100913132321 By default the environments development, test, cucumber and performance are considered...

To only run a single describe/context block in a long spec, you can say spec spec/models/note_spec.rb:545 ... where the describe...

There are many different methods that allow mapping an Array to a Hash in Ruby. Array#to_h with a...

You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you...

When submitting textareas, browsers sometimes include carriage returns (\r) instead of just line feeds (\n) at the end of each...