On Mon, Jan 18, 2010 at 2:33 PM, Pat Maddox <[email protected]> wrote: > On Jan 18, 2010, at 7:12 AM, David Chelimsky wrote: > >> On Mon, Jan 18, 2010 at 9:03 AM, Ashley Moran >> <[email protected]> wrote: >>> >>> On Jan 18, 2010, at 9:31 am, Pat Maddox wrote: >>> >>>> define_simple_predicate_matcher :rise_from_the_ashes? >>> >>> As an extension, how about: >>> >>> define_simple_predicate_matcher :risen_from_the_ashes => >>> :rises_from_the_ashes? >> >> I'd rather not add a new DSL for the few cases in which we want to >> essentially delegate a predicate. We can already do this with the >> matcher DSL: >> >> Spec::Matchers.define :risen_from_the_ashes do >> match {|actual| actual.risen_from_the_ashes?} >> end >> >> This is better aligned w/ other matchers, more clear as to what it >> does, and isn't much more code. > > This was a suggestion for OP to add to his own codebase, not RSpec, if he > wanted to make the matcher definition even more concise.
Understood. Thx. > Pat _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
