On Sunday, 1 February 2015 15:47:39 UTC, Myron Marston wrote: > > By defining a custom be_acceptable matcher, you are telling RSpec you > want the description and failure message to use “be acceptable” in the > description and failure message. > > OTOH, if you simply want to use be_acceptable, and don’t care about it > actually being a custom matcher, you can define it simply as a well-named > helper method that returns the compound matcher expression: > > module MatcherHelpers > def be_acceptable > be_even.and be > 10 > endend > RSpec.configure do |c| > c.include MatcherHelpersend > > …which will give you the exact same failure as your first example. > Thanks Myron – looks like I was trying to make things too complicated! Sorry for not replying earlier, but apparently Google Groups had decided not to mail me updates for the thread for some reason.
Kerry -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to rspec+unsubscr...@googlegroups.com. To post to this group, send email to rspec@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/5a5cb416-d864-4e54-91ae-a5a5277da9c5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.