diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 2 | ||||
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 94099fcd2e..7c5183e6c8 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -52,7 +52,7 @@ module GeneratorsTestHelper 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 diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 39e8a5f756..17c3f979c0 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -341,7 +341,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 |