spec/spec_helper.rb in finite-1.0.0 vs spec/spec_helper.rb in finite-1.1.0
- old
+ new
@@ -8,13 +8,13 @@
RSpec.configure do |config|
original_stderr = $stderr
original_stdout = $stdout
config.before(:all) do
# Redirect stderr and stdout
- $stderr = File.new(File.join(File.dirname(__FILE__), 'null.txt'), 'w')
- $stdout = File.new(File.join(File.dirname(__FILE__), 'null.txt'), 'w')
+ $stderr = StringIO.new
+ $stdout = StringIO.new
end
config.after(:all) do
$stderr = original_stderr
$stdout = original_stdout
end
-end
\ No newline at end of file
+end