Displaying 5 results from an estimated 5 matches for "instantiate_fixtur".
Did you mean:
instantiate_fixtures
2006 Apr 21
2
destory Test Case Messes up all tests
I am trying to create unit tests for my users model but when I add a
test that destroys a user, that user is not available in any of the
other test. If I remove the test that destroys the user all my other
tests work again.
All the fixtures are suppose be reloaded between tests right?
Here is my testcase :
require File.dirname(__FILE__) + ''/../test_helper''
class UserTest
2005 Jan 15
0
Model syntax errors obscured during fixture load
...1) Error:
test_basic(MovieTest):
NoMethodError: undefined method `primary_key'' for nil:NilClass
/usr/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/fixtures.rb:298:in
`find''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/fixtures.rb:149:in
`instantiate_fixtures''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/fixtures.rb:149:in
`each''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_record/fixtures.rb:149:in
`instantiate_fixtures''
/usr/lib/ruby/gems/1.8/gems/activerecord-1.4.0/lib/active_r...
2004 Dec 09
3
fixture problem, TypeError: nil is not a symbol
...dor/activerecord/lib/active_record/fixtures.rb:168:in
`const_get''
./test/unit/../../config/environments/../../vendor/activerecord/lib/active_record/fixtures.rb:168:in
`find''
./test/unit/../../config/environments/../../vendor/activerecord/lib/active_record/fixtures.rb:78:in
`instantiate_fixtures''
./test/unit/../../config/environments/../../vendor/activerecord/lib/active_record/fixtures.rb:78:in
`each''
./test/unit/../../config/environments/../../vendor/activerecord/lib/active_record/fixtures.rb:78:in
`instantiate_fixtures''
./test/unit/../../config/enviro...
2006 May 09
2
load fixtures
...ossible fixture per table. (Or perhaps use test fixtures
named similarly but in different directories.)
2. Load a test fixture for one test method only in a test file (and not for the
other test methods in the source file)? Thought I had a way to do this using
Fixtures.create_fixtures and Fixtures.instantiate_fixtures, but it messed up the
deleting of other fixtures'' data at the start of the next test method.
Thanks,
Kian W
2006 Feb 22
2
self.use_instantiated_fixtures
Can this be controlled on a per TestCase basis, or is it only a global
setting?
David