aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/test/cases/base_test.rb2
-rw-r--r--activerecord/test/cases/locking_test.rb4
-rw-r--r--railties/test/queueing/threaded_consumer_test.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index 5887782cad..8a4ce5e963 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -478,7 +478,7 @@ class BasicsTest < ActiveRecord::TestCase
if current_adapter?(:MysqlAdapter) or current_adapter?(:Mysql2Adapter)
def test_update_all_with_order_and_limit
- assert_equal 1, Topic.update_all("content = 'bulk updated!'", nil, :limit => 1, :order => 'id DESC')
+ assert_equal 1, Topic.limit(1).order('id DESC').update_all(:content => 'bulk updated!')
end
end
diff --git a/activerecord/test/cases/locking_test.rb b/activerecord/test/cases/locking_test.rb
index ee180e4154..afb0bd6fd9 100644
--- a/activerecord/test/cases/locking_test.rb
+++ b/activerecord/test/cases/locking_test.rb
@@ -358,7 +358,7 @@ unless current_adapter?(:SybaseAdapter, :OpenBaseAdapter) || in_memory_db?
def test_sane_find_with_lock
assert_nothing_raised do
Person.transaction do
- Person.find 1, :lock => true
+ Person.lock.find(1)
end
end
end
@@ -369,7 +369,7 @@ unless current_adapter?(:SybaseAdapter, :OpenBaseAdapter) || in_memory_db?
def test_eager_find_with_lock
assert_nothing_raised do
Person.transaction do
- Person.find 1, :include => :readers, :lock => true
+ Person.includes(:readers).lock.find(1)
end
end
end
diff --git a/railties/test/queueing/threaded_consumer_test.rb b/railties/test/queueing/threaded_consumer_test.rb
index 8e31ebf3c7..dd5efa26ea 100644
--- a/railties/test/queueing/threaded_consumer_test.rb
+++ b/railties/test/queueing/threaded_consumer_test.rb
@@ -76,6 +76,6 @@ class TestThreadConsumer < ActiveSupport::TestCase
sleep 0.1
assert_equal 1, logger.logged(:error).size
- assert_match /Job Error: RuntimeError: Error!/, logger.logged(:error).last
+ assert_match(/Job Error: RuntimeError: Error!/, logger.logged(:error).last)
end
end