The new RSpec format - testing/spec’ing in Ruby
The RSpec API has been changed. So some of the documentation on RSpec syntax is now obsolete, including Dave Astel’s cheat sheet.
For instance this doesn’t work in the newest version:
I got an error message saying “undefined method `should_raise’”. It should be changed into:
I looked for documentation of these changes on the RSpec website. They are apparently not that easy to find. Pelle sent me this link to a page in the RDoc that describes the built in Expression Matchers and has examples. I haven’t found a super clear description of what “Expression Matchers” are, but they seem to be what goes after “should” or “should_not”.