The most common use case for Ruby's #collect is to call a method on each list element and collect...
The Rails logger will store its content in a buffer and write it into the file system every 1000 lines...
RSpec lets you define the arguments with which you expect a method to be invoked: subject.should_receive(:say).with('hello...
Capybara will match elements outside of a page's tag. For example, the step definitions below match nodes in a...
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...
Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.
Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...
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
If Rails or Rake are complaining about a missing gem that is listed in your Gemfile.lock and the listed version...
features are pre-sold without any option to negotiate what’s important and what may be left out, you inevitably...
This will reduce the filesize of foo and bar to 0 bytes: truncate -s0 foo bar If the files do...
Most likely you run rake and your code is causing an exception which is not the one shown in your...
When installing your first formula, Homebrew may complain about not being able to access certain directories. The easiest solution to...
When your Solr seems to be started properly (a process is running with the correct data directory) but never responds...
When you put a Rake task into lib/tasks, but running it fails with... Don't know how to build task...
cURL makes a web request and shows you the response body. You can redirect the response body to /dev/null just...