aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2016-12-25 10:28:54 +0900
committerAkira Matsuda <ronnie@dio.jp>2016-12-25 13:15:56 +0900
commit4ba9e61d99dfe1d65d8aefd66eeec653f965c8d9 (patch)
treef8e6b9b7462752ff1ccbba4243ad94fae4eda74e /activesupport/test
parent85ca8c08c23783ee81a144c325c68f2a606dbf1b (diff)
downloadrails-4ba9e61d99dfe1d65d8aefd66eeec653f965c8d9.tar.gz
rails-4ba9e61d99dfe1d65d8aefd66eeec653f965c8d9.tar.bz2
rails-4ba9e61d99dfe1d65d8aefd66eeec653f965c8d9.zip
Expectation first
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb8
-rw-r--r--activesupport/test/safe_buffer_test.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index 698a67b0b3..53ee45f963 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -536,11 +536,11 @@ class HashExtTest < ActiveSupport::TestCase
def test_indifferent_deleting
get_hash = proc { { a: "foo" }.with_indifferent_access }
hash = get_hash.call
- assert_equal hash.delete(:a), "foo"
- assert_equal hash.delete(:a), nil
+ assert_equal "foo", hash.delete(:a)
+ assert_equal nil, hash.delete(:a)
hash = get_hash.call
- assert_equal hash.delete("a"), "foo"
- assert_equal hash.delete("a"), nil
+ assert_equal "foo", hash.delete("a")
+ assert_equal nil, hash.delete("a")
end
def test_indifferent_select
diff --git a/activesupport/test/safe_buffer_test.rb b/activesupport/test/safe_buffer_test.rb
index e046b8d773..811ed2332e 100644
--- a/activesupport/test/safe_buffer_test.rb
+++ b/activesupport/test/safe_buffer_test.rb
@@ -175,6 +175,6 @@ class SafeBufferTest < ActiveSupport::TestCase
test "Should not affect frozen objects when accessing characters" do
x = "Hello".html_safe
- assert_equal x[/a/, 1], nil
+ assert_equal nil, x[/a/, 1]
end
end