describe NoisyClass do before :all do @noisy = NoisyClass.new silence_stream(STDOUT) do #The console output in this block #will never be seen @noisy.generate_console_output end end end
The 'silence_stream' method is defined in 'vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb' and is used to silence any stream for the duration of the block.
No comments:
Post a Comment