diff options
Diffstat (limited to 'railties/test/isolation/abstract_unit.rb')
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 39e8a5f756..2c4d9c5995 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -69,7 +69,8 @@ module TestHelpers def assert_welcome(resp) assert_equal 200, resp[0] - assert resp[1]["Content-Type"] = "text/html" + assert_match 'text/html', resp[1]["Content-Type"] + assert_match 'charset=utf-8', resp[1]["Content-Type"] assert extract_body(resp).match(/Welcome aboard/) end @@ -341,7 +342,7 @@ class ActiveSupport::TestCase def silence_stream(stream) old_stream = stream.dup - stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null') + stream.reopen(IO::NULL) stream.sync = true yield ensure |