I am testing the class which put on the console some messages (with puts, p warnings and etc.). I am just wondering if there is any ability to suppress this output during R
An Rspec3.0 Version would be => in spec_helper.rb
RSpec.configure do |c| c.before { allow($stdout).to receive(:puts) } end
it will act as before(:each)
before(:each)
but :each is default, so no need to write it explicitly