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

On Nov 6, 2010, at 7:54 PM, Hedge H. 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

On Sun, Nov 7, 2010 at 10:49 PM, David C. [email protected]
wrote:

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 :slight_smile:

http://wiki.hedgehogshiatus.com


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users


rspec-users mailing list
[email protected]
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