aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-08-19 02:07:46 +0200
committerXavier Noria <fxn@hashref.com>2010-08-19 02:08:28 +0200
commitc510f059673edf9477c90c3c9c083caa6689101d (patch)
treebb7c9b8de759418f581f83060da1e9439f70c4a0 /activerecord/test/cases
parent483b60b9ff2b467c9d4f4892ef1d5b68c95793d8 (diff)
downloadrails-c510f059673edf9477c90c3c9c083caa6689101d.tar.gz
rails-c510f059673edf9477c90c3c9c083caa6689101d.tar.bz2
rails-c510f059673edf9477c90c3c9c083caa6689101d.zip
get rid of the warning "+ after local variable is interpreted as binary operator even though it seems like unary operator" in Ruby 1.9.2
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/autosave_association_test.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb
index 4693cb45fc..52382f5afc 100644
--- a/activerecord/test/cases/autosave_association_test.rb
+++ b/activerecord/test/cases/autosave_association_test.rb
@@ -249,8 +249,8 @@ class TestDefaultAutosaveAssociationOnABelongsToAssociation < ActiveRecord::Test
assert_equal customer1, order.billing
assert_equal customer2, order.shipping
- assert_equal num_orders +1, Order.count
- assert_equal num_customers +2, Customer.count
+ assert_equal num_orders + 1, Order.count
+ assert_equal num_customers + 2, Customer.count
end
def test_store_association_in_two_relations_with_one_save
@@ -268,8 +268,8 @@ class TestDefaultAutosaveAssociationOnABelongsToAssociation < ActiveRecord::Test
assert_equal customer, order.billing
assert_equal customer, order.shipping
- assert_equal num_orders +1, Order.count
- assert_equal num_customers +1, Customer.count
+ assert_equal num_orders + 1, Order.count
+ assert_equal num_customers + 1, Customer.count
end
def test_store_association_in_two_relations_with_one_save_in_existing_object
@@ -287,8 +287,8 @@ class TestDefaultAutosaveAssociationOnABelongsToAssociation < ActiveRecord::Test
assert_equal customer, order.billing
assert_equal customer, order.shipping
- assert_equal num_orders +1, Order.count
- assert_equal num_customers +1, Customer.count
+ assert_equal num_orders + 1, Order.count
+ assert_equal num_customers + 1, Customer.count
end
def test_store_association_in_two_relations_with_one_save_in_existing_object_with_values
@@ -311,14 +311,14 @@ class TestDefaultAutosaveAssociationOnABelongsToAssociation < ActiveRecord::Test
assert_equal customer, order.billing
assert_equal customer, order.shipping
- assert_equal num_orders +1, Order.count
- assert_equal num_customers +2, Customer.count
+ assert_equal num_orders + 1, Order.count
+ assert_equal num_customers + 2, Customer.count
end
def test_store_association_with_a_polymorphic_relationship
num_tagging = Tagging.count
tags(:misc).create_tagging(:taggable => posts(:thinking))
- assert_equal num_tagging +1, Tagging.count
+ assert_equal num_tagging + 1, Tagging.count
end
end
@@ -372,7 +372,7 @@ class TestDefaultAutosaveAssociationOnAHasManyAssociation < ActiveRecord::TestCa
assert firm.save
assert !client.new_record?
- assert_equal no_of_clients+1, Client.count
+ assert_equal no_of_clients + 1, Client.count
end
def test_invalid_build
@@ -403,8 +403,8 @@ class TestDefaultAutosaveAssociationOnAHasManyAssociation < ActiveRecord::TestCa
assert !new_firm.new_record?
assert !c.new_record?
assert_equal new_firm, c.firm
- assert_equal no_of_firms+1, Firm.count # Firm was saved to database.
- assert_equal no_of_clients+2, Client.count # Clients were saved to database.
+ assert_equal no_of_firms + 1, Firm.count # Firm was saved to database.
+ assert_equal no_of_clients + 2, Client.count # Clients were saved to database.
assert_equal 2, new_firm.clients_of_firm.size
assert_equal 2, new_firm.clients_of_firm(true).size
@@ -1061,7 +1061,7 @@ module AutosaveAssociationOnACollectionAssociationTests
end
def test_should_allow_to_bypass_validations_on_the_associated_models_on_create
- assert_difference("#{ @association_name == :birds ? 'Bird' : 'Parrot' }.count", +2) do
+ assert_difference("#{ @association_name == :birds ? 'Bird' : 'Parrot' }.count", 2) do
2.times { @pirate.send(@association_name).build }
@pirate.save(:validate => false)
end