aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-01-10 15:11:51 +0100
committerYves Senn <yves.senn@gmail.com>2015-01-10 15:12:04 +0100
commit89470bbc5ea4e1375dc948b0629a419c1ad5c4f5 (patch)
tree710fd31b988c5a891807f6d3b8517c4916375f0f /railties/test
parente47d6a31a57ae4f5ca1ce0fdfe1e18e7ac069e43 (diff)
parent69e365d2f420572d186cb3e0373e067c1343d09f (diff)
downloadrails-89470bbc5ea4e1375dc948b0629a419c1ad5c4f5.tar.gz
rails-89470bbc5ea4e1375dc948b0629a419c1ad5c4f5.tar.bz2
rails-89470bbc5ea4e1375dc948b0629a419c1ad5c4f5.zip
Merge branch 'Prefer-IO_NULL'. Closes #18381.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/generators_test_helper.rb2
-rw-r--r--railties/test/isolation/abstract_unit.rb2
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