Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce test on Error#full_message for attribute with underscores; Fix... #9864

Merged
merged 1 commit into from Mar 25, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions activemodel/test/cases/errors_test.rb
Expand Up @@ -225,6 +225,7 @@ def test_has_key?
test 'full_message should return the given message with the attribute name included' do test 'full_message should return the given message with the attribute name included' do
person = Person.new person = Person.new
assert_equal "name can not be blank", person.errors.full_message(:name, "can not be blank") assert_equal "name can not be blank", person.errors.full_message(:name, "can not be blank")
assert_equal "name_test can not be blank", person.errors.full_message(:name_test, "can not be blank")
end end


test 'should return a JSON hash representation of the errors' do test 'should return a JSON hash representation of the errors' do
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/base_test.rb
Expand Up @@ -1024,7 +1024,7 @@ def test_dont_clear_sequence_name_when_setting_explicitly
Joke.reset_sequence_name Joke.reset_sequence_name
end end


def test_dont_clear_inheritnce_column_when_setting_explicitly def test_dont_clear_inheritance_column_when_setting_explicitly
Joke.inheritance_column = "my_type" Joke.inheritance_column = "my_type"
before_inherit = Joke.inheritance_column before_inherit = Joke.inheritance_column


Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/nested_attributes_test.rb
Expand Up @@ -806,7 +806,7 @@ def test_can_use_symbols_as_object_identifier
assert_nothing_raised(NoMethodError) { @pirate.save! } assert_nothing_raised(NoMethodError) { @pirate.save! }
end end


def test_numeric_colum_changes_from_zero_to_no_empty_string def test_numeric_column_changes_from_zero_to_no_empty_string
Man.accepts_nested_attributes_for(:interests) Man.accepts_nested_attributes_for(:interests)


repair_validations(Interest) do repair_validations(Interest) do
Expand Down