Hedge Hog
2010-Nov-07 00:54 UTC
[rspec-users] Hooks before a scenario but not the background: possible or bad practice
Hi, I''d like to activate FakeFS for some scenarios, which I tag @fakefs, however it seems Before(''@fakefs'') runs before the background of the feature - unfortunately this clobbers Grit, and I can''t Grit::Repo.new(...) in the backbround. Is it currently possible to get a hook to run before a scenario, but not the Background of the feature? Or am I mistaken in making a distinction between a scenario and the background of a feature? Best wishes -- ????'' ??? ??????, ???'' ?????? ?? ???? [The fox knows many things, but the hedgehog knows one big thing.] ? Archilochus, Greek poet (c. 680 BC ? c. 645 BC) http://wiki.hedgehogshiatus.com
David Chelimsky
2010-Nov-07 11:49 UTC
[rspec-users] Hooks before a scenario but not the background: possible or bad practice
On Nov 6, 2010, at 7:54 PM, Hedge Hog wrote:> Hi, > I''d like to activate FakeFS for some scenarios, which I tag @fakefs, > however it seems Before(''@fakefs'') runs before the background of the > feature - unfortunately this clobbers Grit, and I can''t > Grit::Repo.new(...) in the backbround. > Is it currently possible to get a hook to run before a scenario, but > not the Background of the feature? > > Or am I mistaken in making a distinction between a scenario and the > background of a feature?Please post this to the Cucumber list: http://groups.google.com/group/cukes. Cheers, David> > Best wishes > > -- > ????'' ??? ??????, ???'' ?????? ?? ???? > [The fox knows many things, but the hedgehog knows one big thing.] > Archilochus, Greek poet (c. 680 BC ? c. 645 BC) > http://wiki.hedgehogshiatus.com > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Hedge Hog
2010-Nov-07 18:53 UTC
[rspec-users] Hooks before a scenario but not the background: possible or bad practice
On Sun, Nov 7, 2010 at 10:49 PM, David Chelimsky <dchelimsky at gmail.com> wrote:> On Nov 6, 2010, at 7:54 PM, Hedge Hog wrote: > >> Hi, >> I''d like to activate FakeFS for some scenarios, which I tag @fakefs, >> however it seems Before(''@fakefs'') runs before the background of the >> feature - unfortunately this clobbers Grit, and I can''t >> Grit::Repo.new(...) in the backbround. >> Is it currently possible to get a hook to run before a scenario, but >> not the Background of the feature? >> >> Or am I mistaken in making a distinction between a scenario and the >> background of a feature? > > Please post this to the Cucumber list: http://groups.google.com/group/cukes. >Apologies for using the wrong list and that this was due to something in the Before hook failing - so I won''t resurrect this on the cukes list. Things work as expected when driven by a suitable operator :)> Cheers, > David > >> >> Best wishes >> >> -- >> ????'' ??? ??????, ???'' ?????? ?? ???? >> [The fox knows many things, but the hedgehog knows one big thing.] >> ? Archilochus, Greek poet (c. 680 BC ? c. 645 BC) >> http://wiki.hedgehogshiatus.com >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users-- ????'' ??? ??????, ???'' ?????? ?? ???? [The fox knows many things, but the hedgehog knows one big thing.] ? Archilochus, Greek poet (c. 680 BC ? c. 645 BC) http://wiki.hedgehogshiatus.com
Reasonably Related Threads
- How to intercept an instance method from StdLib (1.9.2)
- Does RSpec interfere with Pathname#dirname or Pathname#realpath ?
- testing Rake tasks with FakeFS
- [Bug 23495] New: nouveau KMS produces no output on a Dell 3008WFP monitor
- multiple vms with same PCI passthrough