王筝的博客
ruby学习
rspec new expectation syntax
using the new rspec syntax for expectations instead the old `should`
you can write this in the new syntax like

“`it { is_expected.to validate_numericality_of(:years_lived) }“`

https://github.com/thoughtbot/shoulda-matchers#should-vs-is_expectedto

More info about http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/

Leave a Reply