search for: teardown_with_fixtures

Displaying 3 results from an estimated 3 matches for "teardown_with_fixtures".

2005 Dec 21
6
Rails without a db - how to run tests
...specification.rb:111:in `retrieve_connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in `connection'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/fixtures.rb:508:in `teardown_with_fixtures'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/fixtures.rb:531:in `teardown'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/fixtures.rb:529:in `teardown'' I put this in my test_helper.rb file: class Fixtures def teardown()...
2006 Oct 17
3
Should fixtures be transactional?
I started using the new Model.should_have(1).records expectation in rspec_on_rails, and quickly realized that my fixtures were remaining loaded, even in contexts that didn''t use them. Bug or feature? Jay Levitt
2007 Oct 08
3
test not rolling back
...a ROLLBACK for each test case. If I run a single file, foo_controller_test.rb, it works as expected. I see BEGIN and ROLLBACK 8 times in the log files. But if I run: rake test:functionals I get 3 COMMITs, 196 BEGINS and 193 ROLLBACKs. The code in fixtures.rb that deals with this is : def teardown_with_fixtures return unless defined?(ActiveRecord::Base) && ! ActiveRecord::Base.configurations.blank? # Rollback changes if a transaction is active. if use_transactional_fixtures? && Thread.current[''open_transactions''] != 0 ActiveRecord::Base.c...