In case https://www.rubydoc.info/ is to slow or offline, you can also read a gem documentation offline. Start a server...

Update: This trick probably isn't very useful anymore in Ruby 2.x. The Ruby GC has improved a lot...

imperialviolet.org

In January this year (2010), Gmail switched to using HTTPS for everything by default. Previously it had been introduced as...

justinfrench.com

If you’re testing the behavior of deprecated code in your Ruby project, the warning messages littered throughout your spec...

kernel.org

Git allows you to do a binary search across commits to hunt down the commit that introduced a bug.

linux.die.net

If you need to find out which of your local commits are not on the remote server do this:

alistapart.com

I was recently confronted with the task of creating a two-column liquid layout with a header and footer in...

In RSpec 2 shared_examples_for can have parameters. You can simply hand over arguments from it_behaves...

While you can use Capybara matchers like have_css and have_content for expectations, they are not too helpful for...

You can usually just use the eq matched to compare two numbers: expect(deal.total).to eq(120)

When you eagerly load an association list using the .include option, and at the same time have a .where on...

RSpec 1, RSpec 2 To test whether two arrays have the same elements regardless of order, RSpec 1 and 2...

Deadlocks only occur if two transactions in separate threads compete for the same rows in the database. They usually (but...

If your controller spec never reaches your controller code: Make sure you are signed in. Make sure you are actually...

yehudakatz.com

The first thing you need to understand is that the purpose of refinements in Ruby 2.0 is to make monkey...

This card explains how to install RubyMine for the first time. If you want to upgrade an existing RubyMine installation...

Plugins (and gems) are typically tested using a complete sample rails application that lives in the spec folder of the...

To install webmock 1.5.0: sudo gem install webmock --version "=1.5.0" or sudo gem install webmock -v "=1.5.0"

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

Be careful when using params.merge as params is a HashWithIndifferentAccess. Why? Usually this should not be an issue but it...

When using form_for you can give the form's target URL either as a string or an array:

If you need to look at the list of methods that are called upon certain events (like before/after saving etc...

Take care when trying to set attributes to nil in a blueprint. Given the following master blueprint: Story.blueprint do