Rails doesn't know which host it is running on. For generating links, it strips the hostname off the request...
Note that if you plan to downgrade Firefox because your Selenium tests broke after a Firefox upgrade, there is a...
Note that if you plan to freeze your Firefox versions because your Selenium tests break whenever Firefox updates, there is...
Sometimes the Rails helper #distance_of_time_in_words is using too much magic. When you need a time difference...
Do you wonder which databases are actually taking up how much space but only have one huge ibdata1 in your...
This article from the FreeBSD Handbook suggests that editing /etc/rc.conf enables DHCP. Unfortunately, some times this seems not sufficient.
Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...
Vim allows recording a batch of commands as a macro. This is handy if you need to do the same...
Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some...
tl;dr: Always have your attachment path start with :rails_root/storage/#{Rails.env}#{ENV['RAILS_TEST_NUMBER']}/. The directory where you...
If you get the error "413 Request Entity Too Large" from Nginx client_max_body_size is too low (default...
Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and...
When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...
When you need to create a locale for a language variant (like Austrian for German), you probably don't want...
This post is not about devops, it's not about lean startups, it's not about web scale, it's...
Code example for implementing Cross-Origin Resource Sharing (CORS) in Rails.
When you need to zip up files in Ruby, use zipruby. sudo gem install zipruby You can add existing files...
This is now part of geordi. Please don't follow the instructions below, if you use geordi. Inspired by the...
When you have a program running in a hidden X screen (like with Xvfb for Selenium tests) you may want...
If you're writing a spec for an application using Resque, you may need to work off queues manually without...
Note: While the solution in this card should still work, we prefer another solution now: Hide your Selenium browser window...
This finally works: User.any_instance.should_receive(...) as does User.any_instance.stub(...) Note: You won't have RSpec 2.6 if you're still working...
In order to use different encodings than ASCII for HTTP headers use the following syntax: Header-Key: Header-Value; Parameter...
Sometimes you need a file of some size (possibly for testing purposes). On Linux, you can use dd to create...