Permalink
Browse files

Fixing test class names and refactor line in autosave association

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 3f1cdb8 commit 7eedc3f3975cca2b7e729fcb67e310977b5e5dcd @carlosantoniodasilva carlosantoniodasilva committed with josevalim May 19, 2010
@@ -243,7 +243,7 @@ def nested_records_changed_for_autosave?
if [:belongs_to, :has_one].include?(reflection.macro)
return true if association.target && association.target.changed_for_autosave?
else
- association.target.each {|record| return true if record.changed_for_autosave? }
+ return true if association.target.detect { |record| record.changed_for_autosave? }
end
end
end
@@ -1149,7 +1149,7 @@ def setup
include AutosaveAssociationOnACollectionAssociationTests
end
-class TestAutosaveAssociationValidationsOnAHasManyAssocication < ActiveRecord::TestCase
+class TestAutosaveAssociationValidationsOnAHasManyAssociation < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup
@@ -1165,7 +1165,7 @@ def setup
end
end
-class TestAutosaveAssociationValidationsOnAHasOneAssocication < ActiveRecord::TestCase
+class TestAutosaveAssociationValidationsOnAHasOneAssociation < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup
@@ -1186,7 +1186,7 @@ def setup
end
end
-class TestAutosaveAssociationValidationsOnABelongsToAssocication < ActiveRecord::TestCase
+class TestAutosaveAssociationValidationsOnABelongsToAssociation < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup
@@ -1206,7 +1206,7 @@ def setup
end
end
-class TestAutosaveAssociationValidationsOnAHABTMAssocication < ActiveRecord::TestCase
+class TestAutosaveAssociationValidationsOnAHABTMAssociation < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup
@@ -734,7 +734,7 @@ def test_should_update_existing_records_with_non_standard_primary_key
end
end
-class TestHasOneAutosaveAssoictaionWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
+class TestHasOneAutosaveAssociationWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup
@@ -774,7 +774,7 @@ def setup
end
end
-class TestHasManyAutosaveAssoictaionWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
+class TestHasManyAutosaveAssociationWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
self.use_transactional_fixtures = false
def setup

0 comments on commit 7eedc3f

Please sign in to comment.