On Nov 23, 2009, at 11:12 PM, David Chelimsky wrote: > > > On Mon, Nov 23, 2009 at 9:36 PM, Scott Taylor <sc...@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 <dumbog...@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
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users