提交 7eedc3f3 编写于 作者: C Carlos Antonio da Silva 提交者: José Valim

Fixing test class names and refactor line in autosave association

Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 3f1cdb85
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册