Imagine you have 2 HTML boxes. The first one has a margin-bottom of let's say 30px and the...
Delegating methods to other objects is often helpful but the syntax of both def_delegators and def_delegator is a...
You probably know about the possibility to tag scenarios in Cucumber to run your own piece of code before the...
In MySQL comparing zero to a string 0 = "any string" is always true! So when you want to compare a...
REST Client is a nice, simple HTTP client library for Ruby. When you do a simple GET request like that...
In order to save the original value of a constant, set the new value and restore the old value after...
Tooltips that are delivered through HTML attributes are encoded. Decode entities before checking for their presence. Capybara: Then /^there should...
Sometimes it might be helpful to have a version history for a gem, e.g. when you want to see if...
Ever seen this error when using Graticule? Numerical argument out of domain - acos Similarly to the to_sql problem for...
Some helpers for poking around at your Capybara driven browser's cookies in integration tests. Supports Capybara's bundled drivers...
You can use text-overflow to truncate a text using CSS but it does not fit fancy requirements.
When using Rails to truncate strings, you may end up with strings that are still too long for their container...
Possible Reason 1: parallel_tests - running more processes than features If you run old versions of parallel_tests with more...
Consider you have a file that uses improper encoding on special characters. Example: You see the latin1 version "ñ" for...
The step definition below lets you say: Then I should see a field "Password" But I should not see a...
Most of the JavaScript snippets have code that manipulates the DOM. For that reason dom manipulating javascript code should have...
In order to chain greps on log files that are opened via tail -f test.log you have to use the...
The following snippet demonstrates how you could create excel files (with spreadsheet gem) and format columns so that they follow...
Views are normally (for good reason) not rendered in controller specs. If you need it to happen, use:
Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.
Use the command geordi migrate to migrate your databases and to prepare them before running tests. The abbrevation geordi m...
Removing features and merging those changes back can be painful. Here is how it worked for me.\
In cucumber you are able to run features in whatever directory you like. This also includes executing features in subdirectories...
Firefox, Opera and Internet Explorer will repeat elements with position: fixed on every printed page (see attached example).