Sometimes you have a test expectation but actually want a better error message in case of a failure. Here is...
Put the attached file into features/support/. Example usage: When /^I open the task named "(.+?)"$/ do |task_name| task = page.all('.task...
Mornings can be rough. To make them a little easier, leave yourself a failing test if your work isn’t...
After I upgraded to Mac OS X Mavericks, I regularly got this error message when running Cucumber features with Selenium...
Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...
Non-static elements will not inherit their parent's opacity in IE for no good reason. This can lead to...
A MySQL DECIMAL column is used when it is important to preserve exact precision. It takes two parameters, where...
We have released Modularity 2. It has many incompatible changes. See below for a script to migrate your applications automatically...
If you want to test that a certain text is contained within the document title of your page, you can...
When you do something like this in your code: def var_value @var ||= some_expensive_calculation end
TLDR: This card explains which threads and processes interact with each other when you run a Selenium test with Capybara...
In Ruby, classes and modules are called constants. This card explains how Ruby resolves the meaning of a constant.
When you print something from within your .bashrc file you will run into trouble when copying something onto your machine...
# Attach a file # # Example: # # Company.new.logo = File.new… # # Given the file "…" was attached as logo to the company above # # # Example: # # class Gallery...
This error occurs when you already have a database.yml which defines the database for the cucumber environment instead of test...
Say you have a User with a Carrierwave attribute #avatar: class User < ActiveRecord::Base mount_uploader :avatar, AvatarUploader end
When you want to find out the data type of an attribute, you can just use ActiveRecord's columns_hash...
If you get a Quota error with OpenStack, it doesn't have to be what it tell. For example, I...
Sometimes you need to monitor a connection from your machine to a specific, single host or network in order to...
Use protocol independent URLs whenever possible so that the browser will choose the protocol related to the protocol which the...
Font Combiner offers a way to tweak and adjust any TTF or OTF font (license permitting), by bringing in font...
One of many useful techniques when your test suite needs to talk to a remote API.
If you need to enable NewRelic monitoring on certain machines within the same Rails environment, a simple solution is to...
Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is...