diff options
author | Jamis Buck <jamis@37signals.com> | 2005-06-10 14:58:02 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-06-10 14:58:02 +0000 |
commit | 2c0fa3208859aed2c1fd0ce54c8d5215d11d0c75 (patch) | |
tree | b65523d2f9c2d0b79bc0b65157e966ee36ebd1a2 /activerecord/test/associations_test.rb | |
parent | 7f9ffb2ebf1a0230368f54a6372cb7196c90177e (diff) | |
download | rails-2c0fa3208859aed2c1fd0ce54c8d5215d11d0c75.tar.gz rails-2c0fa3208859aed2c1fd0ce54c8d5215d11d0c75.tar.bz2 rails-2c0fa3208859aed2c1fd0ce54c8d5215d11d0c75.zip |
Do not use instantiated fixtures (in general) in tests. Also, support the use of transactional fixtures by setting the AR_TX_FIXTURES environment variable to "yes".
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-x | activerecord/test/associations_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index 8b1c2a6c62..4cf4868ef7 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -556,6 +556,7 @@ class HasManyAssociationsTest < Test::Unit::TestCase assert_nothing_raised { topic.destroy } end + uses_transaction :test_dependence_with_transaction_support_on_failure def test_dependence_with_transaction_support_on_failure assert_equal 2, Client.find_all.length firm = Firm.find_first @@ -851,7 +852,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase def test_uniq_before_the_fact projects(:active_record).developers << developers(:jamis) projects(:active_record).developers << developers(:david) - assert_equal 2, projects(:active_record).developers.size + assert_equal 2, projects(:active_record, :reload).developers.size end def test_deleting @@ -933,7 +934,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase assert_equal 1, projects(:active_record).developers_named_david.size projects(:active_record).developers_named_david.clear - assert_equal 1, projects(:active_record).developers.size + assert_equal 1, projects(:active_record, :reload).developers.size end def test_find_in_association |