[rspec-users] disabling transactional fixtures for one spec

David Chelimsky dchelimsky at gmail.com
Sat Feb 23 09:17:56 EST 2008


On Fri, Feb 22, 2008 at 11:21 AM, Paul Dowman <lists at pauldowman.com> wrote:
> 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.

Try this - don't know if it works but I think it might:

describe "MyClass without transactional fixtures" do
  self.use_transactional_fixtures = true
  ...
end

Let us know if it works.

Cheers,
David

>
>  Thanks,
>  Paul
>  _______________________________________________
>  rspec-users mailing list
>  rspec-users at rubyforge.org
>  http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list