aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 13:42:35 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-20 13:42:35 +0000
commitb2cfbc4cc9029252735a821a46c82ccc0f0b680d (patch)
tree6c1e61e7509a23fb557b2f573b0a6b8fdc703f17 /activerecord/test
parent6717ed61c11e62c11eb7d5c42638962abfc6dd8b (diff)
downloadrails-b2cfbc4cc9029252735a821a46c82ccc0f0b680d.tar.gz
rails-b2cfbc4cc9029252735a821a46c82ccc0f0b680d.tar.bz2
rails-b2cfbc4cc9029252735a821a46c82ccc0f0b680d.zip
Added with additional settings for working with transactional fixtures and pre-loaded test databases #865 [mindel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@924 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/fixtures_test.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/activerecord/test/fixtures_test.rb b/activerecord/test/fixtures_test.rb
index 30acb945d1..fb70289996 100755
--- a/activerecord/test/fixtures_test.rb
+++ b/activerecord/test/fixtures_test.rb
@@ -113,8 +113,10 @@ class FixturesWithoutInstantiationTest < Test::Unit::TestCase
fixtures :topics, :developers, :accounts
def test_without_complete_instantiation
- assert_nil @topics
assert_nil @first
+ assert_nil @topics
+ assert_nil @developers
+ assert_nil @accounts
end
def test_fixtures_from_root_yml_without_instantiation
@@ -123,6 +125,19 @@ class FixturesWithoutInstantiationTest < Test::Unit::TestCase
end
+class FixturesWithoutInstanceInstantiationTest < Test::Unit::TestCase
+ self.use_instantiated_fixtures = :no_instances
+ fixtures :topics, :developers, :accounts
+
+ def test_without_instance_instantiation
+ assert_nil @first
+ assert_not_nil @topics
+ assert_not_nil @developers
+ assert_not_nil @accounts
+ end
+end
+
+
class TransactionalFixturesTest < Test::Unit::TestCase
self.use_transactional_fixtures = true
fixtures :topics