[rspec-users] Hooks before a scenario but not the background: possible or bad practice

Hedge Hog hedgehogshiatus at gmail.com
Sat Nov 6 20:54:16 EDT 2010

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)

More information about the rspec-users mailing list