diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-03-15 18:09:33 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-15 18:22:31 -0700 |
commit | 1def14309f32cc1c7d66b8625754ba2827410c96 (patch) | |
tree | 332ef658525b839eec1269a442494687ec60ad6b /activerecord/test/cases/associations | |
parent | 8dd731bc502a07f4fb76eb2706a1f3bca479ef63 (diff) | |
download | rails-1def14309f32cc1c7d66b8625754ba2827410c96.tar.gz rails-1def14309f32cc1c7d66b8625754ba2827410c96.tar.bz2 rails-1def14309f32cc1c7d66b8625754ba2827410c96.zip |
cleaning up a bunch of parse time warnings in AR [#4186 state:resolved]
Signed-off-by: wycats <wycats@gmail.com>
Diffstat (limited to 'activerecord/test/cases/associations')
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 |