Permalink
Browse files

Updated activerecord test comments to new hash syntax

  • Loading branch information...
1 parent 30d2627 commit 3b89052014c2bf3b8fbbcfb93f657a17dd7e7ca3 @AvnerCohen AvnerCohen committed Oct 23, 2012
@@ -838,7 +838,7 @@ def test_geometric_content
g = Geometric.new(
:a_point => '(5.0, 6.1)',
- #:a_line => '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
+ #a_line: '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
:a_line_segment => '(2.0, 3), (5.5, 7.0)',
:a_box => '2.0, 3, 5.5, 7.0',
:a_path => '[(2.0, 3), (5.5, 7.0), (8.5, 11.0)]', # [ ] is an open path
@@ -867,7 +867,7 @@ def test_geometric_content
g = Geometric.new(
:a_point => '5.0, 6.1',
- #:a_line => '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
+ #a_line: '((2.0, 3), (5.5, 7.0))' # line type is currently unsupported in postgresql
:a_line_segment => '((2.0, 3), (5.5, 7.0))',
:a_box => '(2.0, 3), (5.5, 7.0)',
:a_path => '((2.0, 3), (5.5, 7.0), (8.5, 11.0))', # ( ) is a closed path
@@ -18,7 +18,7 @@ def reset_i18n_load_path
I18n.backend = @old_backend
end
- # validates_associated: generate_message(attr_name, :invalid, :message => custom_message, :value => value)
+ # validates_associated: generate_message(attr_name, :invalid, message: custom_message, value: value)
def test_generate_message_invalid_with_default_message
assert_equal 'is invalid', @topic.errors.generate_message(:title, :invalid, :value => 'title')
end
@@ -27,7 +27,7 @@ def test_generate_message_invalid_with_custom_message
assert_equal 'custom message title', @topic.errors.generate_message(:title, :invalid, :message => 'custom message %{value}', :value => 'title')
end
- # validates_uniqueness_of: generate_message(attr_name, :taken, :message => custom_message)
+ # validates_uniqueness_of: generate_message(attr_name, :taken, message: custom_message)
def test_generate_message_taken_with_default_message
assert_equal "has already been taken", @topic.errors.generate_message(:title, :taken, :value => 'title')
end

0 comments on commit 3b89052

Please sign in to comment.