Current webkit browsers like Chrome and Safari have a special variable in their consoles that refers to the selected DOM...
The NestedHash class allows you to read and write hashes of any depth. Examples: hash = {} NestedHash.write hash, 'a', 'b', 'c...
Enter any command into explainshell and it will explain it to you: split into separate commands (if present), with each...
If you want to inspect the compiled code of your erb (or haml) templates, you can run the following code...
RSpec provides a nice diff when certain matchers fail. Here is an example where this diff is helpful while comparing...
Don't write resources :people, :concerns => :trashable Write resources :people do concerns :trashable end Why Writing a controller...
If you want to configure your nginx to drop connections to a specific location, you can do so by responding...
Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...
RSpec supports a one-liner syntax for setting an expectation on the subject: describe Array do describe "when first created...
Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...
If you expect method calls in RSpec 3, be aware that the argument matchers use very liberal equality rules (more...
In JavaScript we often use Immediately Invoked Function Expessions (or IIFEs) to prevent local variables from bleeding into an outside...
Don't use be_true to check if a value is true. It actually checks if it anything other than...
Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...
Note Maintenance mode is enabled on application server as soon as the file /public/system/maintenance.html is present. Note that the servers...
A comprehensive script to convert test suites from RSpec 2 to RSpec 3. This converts more than should/expect syntax.
The nokogiri gem provides different packages for several platforms. Each platform-specific variant ships pre-built binaries of libxml2, e.g...
A collection of 700+ svg vector logos. The logos are optimized (removed duplicated paths / excessive groups / empty defs, linting, etc...
Regular expressions in Javascript are represented by a RegExp object. There also is a regex literal as in many other...
You know that Devise offers RSpec test helpers for controller specs. However, in request specs, they will not work.
I recommend to go straight to 2.1.5+ without intermediate steps. Otherwhise you burden yourself with unnecessary work of encoding problems...
You can now define this step without Cucumber raising Cucumber::Ambiguous: Then /^I should see "whatever I want"$/ do ...
Cucumber raises a Cucumber::Ambiguous if more than one step definitions match a step. Our new cucumber_priority gem provides...
Simply add this to your .rspec instead: --require spec_helper If you are on rspec >= 3 and use a rails_helper.rb...