Ruby on Rails Saturday, July 15, 2017

be_* is handled by method_missing in rspec-expectations. When you take a look at BePredicate you can see it tries two variants of the phrase following be_*. For example:

expect(user).to be_registered

is roughly equivalent to:

expect(user.registered?).to be_truthy

Yours

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAA6WWt8yXou6QN%3D_LASvkRxdickrhj0gbh%3DnEsjvHGYq%2Bc7JRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment