aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-04-30 17:40:53 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-30 17:40:53 -0700
commita0656989c47c29c87c4f243ce3695c39777c67b8 (patch)
tree7fcf5001bdd445593b88f35e602ce741fa84dc43 /activerecord
parent9274a5744be66581a1cf53c323c6d7555412b3d5 (diff)
downloadrails-a0656989c47c29c87c4f243ce3695c39777c67b8.tar.gz
rails-a0656989c47c29c87c4f243ce3695c39777c67b8.tar.bz2
rails-a0656989c47c29c87c4f243ce3695c39777c67b8.zip
fixing more test warnings in 1.9.3
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/associations/belongs_to_associations_test.rb6
-rw-r--r--activerecord/test/cases/associations/eager_test.rb4
-rw-r--r--activerecord/test/cases/associations/has_many_through_associations_test.rb2
3 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/associations/belongs_to_associations_test.rb b/activerecord/test/cases/associations/belongs_to_associations_test.rb
index 9006914508..7518bc19f9 100644
--- a/activerecord/test/cases/associations/belongs_to_associations_test.rb
+++ b/activerecord/test/cases/associations/belongs_to_associations_test.rb
@@ -576,9 +576,9 @@ class BelongsToAssociationsTest < ActiveRecord::TestCase
end
def test_polymorphic_counter_cache
- tagging = taggings(:welcome_general)
- post = posts(:welcome)
- comment = comments(:greetings)
+ tagging = taggings(:welcome_general)
+ post = post = posts(:welcome)
+ comment = comments(:greetings)
assert_difference 'post.reload.taggings_count', -1 do
assert_difference 'comment.reload.taggings_count', +1 do
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index 9bc7910fc6..3e92a77830 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -170,10 +170,10 @@ class EagerAssociationTest < ActiveRecord::TestCase
assert_equal [comment], category.posts[0].comments
end
end
-
+
def test_associations_loaded_for_all_records
post = Post.create!(:title => 'foo', :body => "I like cars!")
- comment = SpecialComment.create!(:body => 'Come on!', :post => post)
+ SpecialComment.create!(:body => 'Come on!', :post => post)
first_category = Category.create! :name => 'First!', :posts => [post]
second_category = Category.create! :name => 'Second!', :posts => [post]
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 70a4e06dbe..89117593fd 100644
--- a/activerecord/test/cases/associations/has_many_through_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb
@@ -760,7 +760,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase
def test_primary_key_option_on_source
post = posts(:welcome)
category = categories(:general)
- categorization = Categorization.create!(:post_id => post.id, :named_category_name => category.name)
+ Categorization.create!(:post_id => post.id, :named_category_name => category.name)
assert_equal [category], post.named_categories
assert_equal [category.name], post.named_category_ids # checks when target loaded