[rspec-users] Error executing specs using Ruby 1.9.1p243 and RSpec 1.2.9
Scott Taylor
scott at railsnewbie.com
Mon Nov 23 23:37:55 EST 2009
On Nov 23, 2009, at 11:12 PM, David Chelimsky wrote:
>
>
> On Mon, Nov 23, 2009 at 9:36 PM, Scott Taylor <scott at railsnewbie.com> wrote:
>
> On Nov 23, 2009, at 9:35 PM, David Chelimsky wrote:
>
>> On Fri, Nov 20, 2009 at 9:06 PM, Bogdan Dumitru <dumbogdan at gmail.com> wrote:
>> The syntax for use_fakefs changed in version 0.2.1 and the fixtures
>> for rspec are generating errors, but it can be solved easily.
>> Have to change ...
>> describe "smth" do
>> extend FakeFS::SpecHelpers
>> use_fakefs
>> ...
>> end
>> To...
>> extend FakeFS::SpecHelpers
>> use_fakefs describe "smth" do ... end
>>
>> As it seems the use_fakefs method now takes the describe block as a
>> parameter and thus the error regarding the wrong number of parameters.
>>
>> I had to do this slightly differently, but got it to work with fakefs-0.2.1. Fixed in git.
>>
>> Cheers,
>> David
>
> You can use include, too:
>
> module SpecHelpers
> def self.extended(example_group)
> example_group.use_fakefs(example_group)
> end
>
> def self.included(example_group)
> example_group.extend self
> end
> ..
> end
>
> That's exactly what I did :)
>
> http://github.com/dchelimsky/rspec/commit/65485d8be96cd0cb474dc29b6778180349c2d8ee
Hadn't realized the docs were wrong in the README. Now they are updated:
http://github.com/defunkt/fakefs/commit/ceffec3023a2c790cd567275168ed6d6e5bf4ba9
Thanks for the heads up.
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20091123/7c79ae24/attachment.html>
More information about the rspec-users
mailing list