Re: [rspec-users] default to just call the method?

2010-01-20 Thread Corey Haines
Is something like this what you were thinking of? http://gist.github.com/281907 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 =

Re: [rspec-users] default to just call the method?

2010-01-20 Thread Pat Maddox
exactamundo On Jan 20, 2010, at 7:27 AM, Corey Haines wrote: Is something like this what you were thinking of? http://gist.github.com/281907 On Jan 18, 2010, at 9:31 am, Pat Maddox wrote: define_simple_predicate_matcher :rise_from_the_ashes? As an extension, how about:

Re: [rspec-users] default to just call the method?

2010-01-18 Thread Pat Maddox
On Jan 15, 2010, at 6:19 AM, Ashley Moran wrote: On 14 Jan 2010, at 17:02, Rick DeNatale wrote: -1 You can already say a.should include(1:4) which is clearer IMHO. I assume Roger was referring to the general case though (which I still don't like) - and just happened to pick

Re: [rspec-users] default to just call the method?

2010-01-18 Thread Ashley Moran
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 = :rise_from_the_ashes? Also, in general, I think specs look better without ? symbols on methods, my

Re: [rspec-users] default to just call the method?

2010-01-18 Thread David Chelimsky
On Mon, Jan 18, 2010 at 9:03 AM, Ashley Moran ashley.mo...@patchspace.co.uk 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 =

Re: [rspec-users] default to just call the method?

2010-01-18 Thread Ashley Moran
On Jan 18, 2010, at 3:12 pm, David Chelimsky wrote: 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: I think Pat was just suggesting Roger try this in his own code. It's not something I

Re: [rspec-users] default to just call the method?

2010-01-18 Thread Pat Maddox
On Jan 18, 2010, at 7:12 AM, David Chelimsky wrote: On Mon, Jan 18, 2010 at 9:03 AM, Ashley Moran ashley.mo...@patchspace.co.uk 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:

Re: [rspec-users] default to just call the method?

2010-01-18 Thread David Chelimsky
On Mon, Jan 18, 2010 at 2:33 PM, Pat Maddox mailingli...@patmaddox.com wrote: On Jan 18, 2010, at 7:12 AM, David Chelimsky wrote: On Mon, Jan 18, 2010 at 9:03 AM, Ashley Moran ashley.mo...@patchspace.co.uk wrote: On Jan 18, 2010, at 9:31 am, Pat Maddox wrote:

Re: [rspec-users] default to just call the method?

2010-01-15 Thread Ashley Moran
On 14 Jan 2010, at 17:02, Rick DeNatale wrote: -1 You can already say a.should include(1:4) which is clearer IMHO. I assume Roger was referring to the general case though (which I still don't like) - and just happened to pick an example with an existing matcher. --

Re: [rspec-users] default to just call the method?

2010-01-14 Thread Ashley Moran
On Jan 12, 2010, at 10:49 pm, rogerdpack wrote: a.should include?(1:4) # if there's no matcher called include? then just call include? Am I right thinking that this would mean writing a method_missing that creates a matcher for every unhandled message on the example object (whatever scope

Re: [rspec-users] default to just call the method?

2010-01-14 Thread Rick DeNatale
On Tue, Jan 12, 2010 at 5:49 PM, rogerdpack rogerpack2...@gmail.com wrote: Any interest in the following idea? a.should include?(1:4) # if there's no matcher called include? then just call include? or something along those lines? -1 You can already say a.should include(1:4) which is