When your Cucumber feature seems to forget cookies / sessions when you run it with Selenium check if the test travels...
RSpec lets you define the arguments with which you expect a method to be invoked: subject.should_receive(:say).with('hello...
Calling #gsub on a string that was previously marked as #html_safe will lead to unexpected behavior. E. g. backreferences...
If you want to stop getting notified about new messages in a Skype chat (but not leave it altogether), you...
Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...
Given the problem you have a new column postion and that column should be updated for all existing rows with...
Generally for nested forms, a blank form is placed below all other existing object forms. If you would like to...
Defining a custom to_json method for your classes can be useful. Do it properly or you will "randomly" get...
grep -r doesn't work on Solaris. You can only grep on files in the current directory. A workaround is...
When you require the Ruby debugger to be available from your Rails console (e.g. you want to inspect a method...
Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.
When adding a new field to your model's database table, don't set any defaults in the database.
Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...
In order to open a MySQL shell without the need to enter user and password, you can say the following...
Since version 11.10 Opera provides support for linear gradients using -o-linear-gradient. The syntax is pretty similar to Mozilla...
In case you have sensitive data within your RDS instance, you want to use encrypted connections between your application and...
Recently, we had an interesting lunch-break with the rails 3.1. asset-pipeline in production mode. Daniel Zahn made a...
The colors in Rails log files are helpful when watching them but, since they are ANSI color codes like ^[[4...
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
When cucumber encounters a failing step in a @javascript feature, the selenium browser window instantly closes. Sometimes you do not...
The technique described in this card has an important caveat: The result of GROUP_CONCAT is truncated to the maximum...
You can use heredoc to avoid endlessly long lines of code that nobody can read. Heredoc strings preserve linebreaks and...
There is a new card about how to do this with the new AWS Command Line Interface