aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/eager_test.rb2
-rw-r--r--activerecord/test/cases/associations/has_many_through_associations_test.rb4
-rw-r--r--activerecord/test/cases/associations/inner_join_association_test.rb4
3 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index ffa6d45948..42a891bc3b 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -805,7 +805,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
end
def test_include_has_many_using_primary_key
- expected = Firm.find(1).clients_using_primary_key.sort_by &:name
+ expected = Firm.find(1).clients_using_primary_key.sort_by(&:name)
# Oracle adapter truncates alias to 30 characters
if current_adapter?(:OracleAdapter)
firm = Firm.find 1, :include => :clients_using_primary_key, :order => 'clients_using_primary_keys_companies'[0,30]+'.name'
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb
index d47c8bba7d..ff799191c2 100644
--- a/activerecord/test/cases/associations/has_many_through_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -291,7 +291,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
], log.last(2)
post.people_with_callbacks = [people(:michael),people(:david), Person.new(:first_name => "Julian"), Person.create!(:first_name => "Roger")]
- assert_equal (%w(Ted Bob Sam Lary) * 2).sort, log[-12..-5].collect(&:last).sort
+ assert_equal((%w(Ted Bob Sam Lary) * 2).sort, log[-12..-5].collect(&:last).sort)
assert_equal [
[:added, :before, "Julian"],
[:added, :after, "Julian"],
@@ -300,7 +300,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
], log.last(4)
post.people_with_callbacks.clear
- assert_equal (%w(Michael David Julian Roger) * 2).sort, log.last(8).collect(&:last).sort
+ assert_equal((%w(Michael David Julian Roger) * 2).sort, log.last(8).collect(&:last).sort)
end
def test_dynamic_find_should_respect_association_include
diff --git a/activerecord/test/cases/associations/inner_join_association_test.rb b/activerecord/test/cases/associations/inner_join_association_test.rb
index 43abcae75e..4ba867dc7c 100644
--- a/activerecord/test/cases/associations/inner_join_association_test.rb
+++ b/activerecord/test/cases/associations/inner_join_association_test.rb
@@ -15,12 +15,12 @@ class InnerJoinAssociationTest < ActiveRecord::TestCase
def test_construct_finder_sql_ignores_empty_joins_hash
sql = Author.joins({}).to_sql
- assert_no_match /JOIN/i, sql
+ assert_no_match(/JOIN/i, sql)
end
def test_construct_finder_sql_ignores_empty_joins_array
sql = Author.joins([]).to_sql
- assert_no_match /JOIN/i, sql
+ assert_no_match(/JOIN/i, sql)
end
def test_find_with_implicit_inner_joins_honors_readonly_without_select