[rspec-users] disabling transactional fixtures for one spec

Paul Dowman lists at pauldowman.com
Fri Feb 22 12:21:04 EST 2008


Sometimes I need a spec that tests something which can't work inside a
transaction. Is it possible to disable transactional fixtures for one
spec?

I tried:

describe "MyClass without transactional fixtures" do
  before(:all) do
    Spec::Runner.configure { |config|
config.use_transactional_fixtures = false }
  end

  after(:all) do
    Spec::Runner.configure { |config|
config.use_transactional_fixtures = true }
  end
end

... but that doesn't work.

Thanks,
Paul


More information about the rspec-users mailing list