The before and after :suite hooks work for running code before and after
rspec runs all the tests specified, but I need it to explicitly *not run* when
anything less than every single spec is being run. In other words is we are
running rspec spec or rake spec I need this before and after :suite hooks to
run (to clean-up VCR cassettes). If we are not running the full suite, then
it would mistakenly delete the VCR cassettes that were not used by the spec
run.
So I need it to not run the before and after :suite code if running, for
example, rake spec:models or rspec spec/controllers. I am not sure if
rspec, or spec helper is aware of the full test suite being run. ARGV won't
work because when rake spec runs it executes rspec with every individual
spec's path, so there is no way to tell from ARGV if it is the full suite,
without getting really hacky.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users