Re: [rspec-users] Re-using Rspec Matchers

2010-09-08 Thread Ben Mabey
On 9/8/10 11:42 AM, Brian Kaney wrote: Hey Everyone, Is it good practice to call matchers from within matchers? Kinda like this pattern: See: http://gist.github.com/570467 No, that should be avoided. The problem is that the "internal" matcher will throw an exception that will bubble u

Re: [rspec-users] Re-using Rspec Matchers

2010-09-08 Thread David Chelimsky
On Sep 8, 2010, at 5:19 PM, Brian Kaney wrote: > On Sep 8, 2010, at 2:17 PM, "J. B. Rainsberger" wrote: > >> On Wed, Sep 8, 2010 at 14:42, Brian Kaney wrote: >> >>> Is it good practice to call matchers from within matchers? Kinda like >>> this pattern: >>> >>> See: http://gist.github.com/

Re: [rspec-users] Re-using Rspec Matchers

2010-09-08 Thread Brian Kaney
On Sep 8, 2010, at 2:17 PM, "J. B. Rainsberger" wrote: > On Wed, Sep 8, 2010 at 14:42, Brian Kaney wrote: > >> Is it good practice to call matchers from within matchers? Kinda like this >> pattern: >> >> See: http://gist.github.com/570467 > > David Chelimsky taught me not to invoke #shoul

Re: [rspec-users] Re-using Rspec Matchers

2010-09-08 Thread J. B. Rainsberger
On Wed, Sep 8, 2010 at 14:42, Brian Kaney wrote: > Is it good practice to call matchers from within matchers?   Kinda like this > pattern: > >  See: http://gist.github.com/570467 David Chelimsky taught me not to invoke #should in a matcher, but rather just answer a boolean, so I expect that, ra

[rspec-users] Re-using Rspec Matchers

2010-09-08 Thread Brian Kaney
Hey Everyone, Is it good practice to call matchers from within matchers? Kinda like this pattern: See: http://gist.github.com/570467 -- Brian ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users