diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 3aaa19c9dd3f6..95a373e928a29 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -296,8 +296,12 @@ def test_post self.cookies['cookie_1'] = "sugar" self.cookies['cookie_2'] = "oatmeal" get '/cookie_monster' - assert_equal "cookie_1=; path=/\ncookie_3=chocolate; path=/", headers["Set-Cookie"] - assert_equal({"cookie_1"=>"", "cookie_2"=>"oatmeal", "cookie_3"=>"chocolate"}, cookies.to_hash) + _headers = headers["Set-Cookie"].split("\n") + assert _headers.include?("cookie_1=; path=/") + assert _headers.include?("cookie_3=chocolate; path=/") + assert cookies.to_hash["cookie_1"], "" + assert cookies.to_hash["cookie_2"], "oatmeal" + assert cookies.to_hash["cookie_3"], "chocolate" end end diff --git a/actionpack/test/template/html-scanner/tag_node_test.rb b/actionpack/test/template/html-scanner/tag_node_test.rb index 0d87f1bd4235b..3b72243e7d81b 100644 --- a/actionpack/test/template/html-scanner/tag_node_test.rb +++ b/actionpack/test/template/html-scanner/tag_node_test.rb @@ -55,7 +55,12 @@ def test_attributes_with_escaped_quotes def test_to_s node = tag("") - assert_equal %(), node.to_s + node = node.to_s + assert node.include?('a') + assert node.include?('b="c"') + assert node.include?('d="f"') + assert node.include?('g="h') + assert node.include?('i') end def test_tag