Paul Dowman
2008-Feb-22 17:21 UTC
[rspec-users] disabling transactional fixtures for one spec
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
David Chelimsky
2008-Feb-23 14:17 UTC
[rspec-users] disabling transactional fixtures for one spec
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 >