Skip to content
David Chandek-Stark edited this page Jun 5, 2015 · 4 revisions

General

  • If the test setup seems too involved, it may be a code smell.

Tools

rspec-its is a useful gem that used to be part of rspec. It gives you the syntax to refer to methods or keys on the subject like so:

its(:foo) { should eq("bar") }

Arrays

  • Don't use eq when contain_exactly or match_array will do.
Clone this wiki locally