Re: [rspec-users] raise_error suggestion

2010-04-15 Thread rogerdpack
> Be explicit about the error you expect to get: > > lambda { ... }.should raise_error(SomeErrorClass, /match the message/) > > Read the documentation > athttp://rspec.rubyforge.org/rspec/1.3.0/classes/Spec/Matchers.html#M00... Perhaps it should be changed so that if you don't pass a class it out

Re: [rspec-users] raise_error suggestion

2010-04-14 Thread Pat Maddox
On Apr 14, 2010, at 12:28 PM, rogerdpack wrote: > I remember reading a post where somebody mentioned something like > > "sometimes after a refactoring, a test block like > > lambda { ... }.should raise_error > > catches a NoMethodError in error, thus is actually failing, but the > user isn'

Re: [rspec-users] raise_error suggestion

2010-04-14 Thread Paul Hinze
On Wed, Apr 14, 2010 at 2:28 PM, rogerdpack wrote: > change it so that if raise_error is called without parameters, and it > catches NoMethodError, it outputs a warning somehow. > > Thoughts? +1; I have been burned by this several times, and this is seems like an elegant solution to clear up the

[rspec-users] raise_error suggestion

2010-04-14 Thread rogerdpack
I remember reading a post where somebody mentioned something like "sometimes after a refactoring, a test block like lambda { ... }.should raise_error catches a NoMethodError in error, thus is actually failing, but the user isn't notified of the same." A suggestion in this regard: change it