Permalink
Browse files

asakusa.rb hack night!

Fix in-memory tests
  • Loading branch information...
tenderlove committed Aug 6, 2013
1 parent 4c1c2e6 commit 79238bad3debae3c36f6e37c4057b30324731b0c
@@ -55,6 +55,8 @@ def test_default_scope_with_conditions_hash
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')
@@ -545,6 +545,9 @@ class ConcurrentTransactionTest < TransactionTest
# 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

0 comments on commit 79238ba

Please sign in to comment.