ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.73k stars 238 forks source link

Upgrade rspec to 2.14 and update to expect over should syntax #82

Closed durrantm closed 11 years ago

durrantm commented 11 years ago

I would like to offer this branch for consideration. I bumped rspec up to 2.14 I'm offering the rspec expect().to syntax for consideration. As you may well know, 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 noticed that expect is now being used in many of the major gems that use rspec. I changed any pattern matchers from =~ to match() or match_array() as required for this change and while at it I also took the opportunity to change the == format to eq as recommended in the post. All tests still pass after this change.

durrantm commented 11 years ago

I made that change and squashed the commit.

nashby commented 11 years ago

@durrantm Thank you! :heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart: