aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionview/test/template/form_helper/form_with_test.rb8
-rw-r--r--actionview/test/template/form_helper_test.rb8
-rw-r--r--activesupport/test/core_ext/array/conversions_test.rb2
3 files changed, 9 insertions, 9 deletions
diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb
index df81315b9c..c1a8181204 100644
--- a/actionview/test/template/form_helper/form_with_test.rb
+++ b/actionview/test/template/form_helper/form_with_test.rb
@@ -1642,7 +1642,7 @@ class FormWithActsLikeFormForTest < FormWithTest
expected = 0
@post.comments.each do |comment|
f.fields(:comments, model: comment) { |cf|
- assert_equal cf.index, expected
+ assert_equal expected, cf.index
expected += 1
}
end
@@ -1656,7 +1656,7 @@ class FormWithActsLikeFormForTest < FormWithTest
expected = 0
@post.comments.each do |comment|
f.fields(:comments, model: comment) { |cf|
- assert_equal cf.index, expected
+ assert_equal expected, cf.index
expected += 1
}
end
@@ -1669,7 +1669,7 @@ class FormWithActsLikeFormForTest < FormWithTest
form_with(model: @post) do |f|
expected = 0
f.fields(:comments, model: @post.comments) { |cf|
- assert_equal cf.index, expected
+ assert_equal expected, cf.index
expected += 1
}
end
@@ -1680,7 +1680,7 @@ class FormWithActsLikeFormForTest < FormWithTest
form_with(model: @post) do |f|
f.fields(:comments, model: Comment.new(321), child_index: "abc") { |cf|
- assert_equal cf.index, "abc"
+ assert_equal "abc", cf.index
}
end
end
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb
index 50dee1e999..b24f9ed3f0 100644
--- a/actionview/test/template/form_helper_test.rb
+++ b/actionview/test/template/form_helper_test.rb
@@ -2893,7 +2893,7 @@ class FormHelperTest < ActionView::TestCase
expected = 0
@post.comments.each do |comment|
f.fields_for(:comments, comment) { |cf|
- assert_equal cf.index, expected
+ assert_equal expected, cf.index
expected += 1
}
end
@@ -2907,7 +2907,7 @@ class FormHelperTest < ActionView::TestCase
expected = 0
@post.comments.each do |comment|
f.fields_for(:comments, comment) { |cf|
- assert_equal cf.index, expected
+ assert_equal expected, cf.index
expected += 1
}
end
@@ -2920,7 +2920,7 @@ class FormHelperTest < ActionView::TestCase
form_for(@post) do |f|
expected = 0
f.fields_for(:comments, @post.comments) { |cf|
- assert_equal cf.index, expected
+ assert_equal expected, cf.index
expected += 1
}
end
@@ -2931,7 +2931,7 @@ class FormHelperTest < ActionView::TestCase
form_for(@post) do |f|
f.fields_for(:comments, Comment.new(321), child_index: "abc") { |cf|
- assert_equal cf.index, "abc"
+ assert_equal "abc", cf.index
}
end
end
diff --git a/activesupport/test/core_ext/array/conversions_test.rb b/activesupport/test/core_ext/array/conversions_test.rb
index 29e661a99b..bbe81ae70c 100644
--- a/activesupport/test/core_ext/array/conversions_test.rb
+++ b/activesupport/test/core_ext/array/conversions_test.rb
@@ -58,7 +58,7 @@ class ToSentenceTest < ActiveSupport::TestCase
["one", "two"].to_sentence(passing: "invalid option")
end
- assert_equal exception.message, "Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale"
+ assert_equal "Unknown key: :passing. Valid keys are: :words_connector, :two_words_connector, :last_word_connector, :locale", exception.message
end
def test_always_returns_string