diff options
author | Aaron Patterson + Akira Matsuda <aaron.patterson@gmail.com> | 2013-08-06 21:24:28 +0900 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-08-06 21:26:10 +0900 |
commit | 79238bad3debae3c36f6e37c4057b30324731b0c (patch) | |
tree | c6140b2f529c5f4abe74fc70d35a247603f9b874 | |
parent | 4c1c2e650155fd17ceeb41580650da67b684fb34 (diff) | |
download | rails-79238bad3debae3c36f6e37c4057b30324731b0c.tar.gz rails-79238bad3debae3c36f6e37c4057b30324731b0c.tar.bz2 rails-79238bad3debae3c36f6e37c4057b30324731b0c.zip |
asakusa.rb hack night!
Fix in-memory tests
-rw-r--r-- | activerecord/test/cases/scoping/default_scoping_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/transactions_test.rb | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/scoping/default_scoping_test.rb b/activerecord/test/cases/scoping/default_scoping_test.rb index 2358e2396d..cd7d91ff85 100644 --- a/activerecord/test/cases/scoping/default_scoping_test.rb +++ b/activerecord/test/cases/scoping/default_scoping_test.rb @@ -55,6 +55,8 @@ class DefaultScopingTest < ActiveRecord::TestCase end def test_default_scoping_with_threads + skip "in-memory database mustn't disconnect" if in_memory_db? + 2.times do Thread.new { assert DeveloperOrderedBySalary.all.to_sql.include?('salary DESC') diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index f84088def3..3aaee5d94f 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -545,6 +545,9 @@ if current_adapter?(:PostgreSQLAdapter) # This will cause transactions to overlap and fail unless they are performed on # separate database connections. def test_transaction_per_thread + if in_memory_db? + skip "in memory db can't share a db between threads" + end threads = 3.times.map do Thread.new do Topic.transaction do |