benprew / pony

The express way to send mail from Ruby.
1.14k stars 51 forks source link

Update rspec to v2.14 and to use expect over should and eq over == #8

Closed durrantm closed 11 years ago

durrantm commented 11 years ago

Hi, I'd like to offer this rspec upgrade plus suggestion for changes to the RSpec syntax to use the 'expect' format. More than just a style change, it has turned turned out that using 'expect' over 'should' is a recommended practice because of dealing with delegate/proxy objects as detailed in http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax. As detailed in the blog post "In the future, we plan to change the defaults so that only expect is available unless you explicitly enable should. We may do this as soon as RSpec 3.0, but we want to give users plenty of time to get acquianted with it." I've also noticed that many of the major github gems have already made the move. It also helps the spec and the error reporting readability be more english-like. I also took the opportunity to change the '==' operator to 'eq' as recommended in the post. All tests pass.

benprew commented 11 years ago

Michael,

This is great! And thanks for the link, I'm always interested in learning more about rspec.