Matt Wynne
2008-Oct-08 18:15 UTC
[rspec-users] ArgumentError in "is a pending example" - block not supplied
We have a few unfinished examples in our code of the form it "should and does do something" do # stuff end it "should do something someday" it "should and does do something else" do # more stuff end Now since I upgraded my gem to rspec 1.8 today, the empty example is failing with the error ArgumentError in "should do something someday": block not supplied Is this by design? What''s the recommended way to deal with these pending examples? write a block and call pending within it? cheers, Matt
David Chelimsky
2008-Oct-09 00:18 UTC
[rspec-users] ArgumentError in "is a pending example" - block not supplied
On Wed, Oct 8, 2008 at 1:15 PM, Matt Wynne <matt at mattwynne.net> wrote:> We have a few unfinished examples in our code of the form > > it "should and does do something" do > # stuff > end > > it "should do something someday" > > it "should and does do something else" do > # more stuff > end > > Now since I upgraded my gem to rspec 1.8 today, the empty example is failing > with the error ArgumentError in "should do something someday": block not > supplied > > Is this by design?Absolutely not, though I am not having the same experience (blockless examples are correctly reported as pending).> What''s the recommended way to deal with these pending examples? write a > block and call pending within it?That''s how we used to do it before rspec started treating blockless examples as pending. It will band-aid your problem so you can progress. But what you''re experiencing is not what is expected, nor am I able to reproduce it. Is this a rails app? Are you mixing gems and plugins perchance?> > cheers, > Matt > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Matt Wynne
2008-Oct-09 07:04 UTC
[rspec-users] ArgumentError in "is a pending example" - block not supplied
On 9 Oct 2008, at 01:18, David Chelimsky wrote:>> Now since I upgraded my gem to rspec 1.8 today, the empty example >> is failing >> with the error ArgumentError in "should do something someday": >> block not >> supplied >> >> Is this by design? > > Absolutely not, though I am not having the same experience (blockless > examples are correctly reported as pending). > >> What''s the recommended way to deal with these pending examples? >> write a >> block and call pending within it? > > That''s how we used to do it before rspec started treating blockless > examples as pending. It will band-aid your problem so you can > progress. But what you''re experiencing is not what is expected, nor am > I able to reproduce it. > > Is this a rails app? Are you mixing gems and plugins perchance?Yes and yes. Aha. I hadn''t bothered to upgrade the plugin as I figured that using ''spec'' from the command line would run the 1.1.8 version from my gems folder, and not touch the plugin at all. Let me upgrade the plugin too and see what happens. thanks, Matt
David Chelimsky
2008-Oct-09 10:10 UTC
[rspec-users] ArgumentError in "is a pending example" - block not supplied
On Thu, Oct 9, 2008 at 2:04 AM, Matt Wynne <matt at mattwynne.net> wrote:> On 9 Oct 2008, at 01:18, David Chelimsky wrote: >>> >>> Now since I upgraded my gem to rspec 1.8 today, the empty example is >>> failing >>> with the error ArgumentError in "should do something someday": block not >>> supplied >>> >>> Is this by design? >> >> Absolutely not, though I am not having the same experience (blockless >> examples are correctly reported as pending). >> >>> What''s the recommended way to deal with these pending examples? write a >>> block and call pending within it? >> >> That''s how we used to do it before rspec started treating blockless >> examples as pending. It will band-aid your problem so you can >> progress. But what you''re experiencing is not what is expected, nor am >> I able to reproduce it. >> >> Is this a rails app? Are you mixing gems and plugins perchance? > > Yes and yes. > > Aha. > > I hadn''t bothered to upgrade the plugin as I figured that using ''spec'' from > the command line would run the 1.1.8 version from my gems folder, and not > touch the plugin at all. > > Let me upgrade the plugin too and see what happens.Actually, I''d recommend the other way around: get rid of the plugins and use the 1.1.8 gems for rspec and rspec-rails. Cheers, David> > thanks, > Matt > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >