github-app/spec/spec_helper.rb
# usage: basically any output from the code is sent to /dev/null
# no_ouput do
#   ... code here
# end
basically any output from the code is sent to /dev/null
no_ouput do
code here
end
basically any output from the code is sent to / dev / null no_ouput do code here end
def no_output
  original_stdout = $stdout.dup
  $stdout.reopen('/dev/null')
  $stdout.sync = true
  begin
    yield
  ensure
    $stdout.reopen(original_stdout)
  end
end
def no_output original_stdout = $stdout . dup $stdout . reopen ( '/dev/null' ) $stdout . sync = true begin yield ensure $stdout . reopen ( original_stdout ) end end
usage: basically any output from the code is sent to /dev/null
no_ouput do
... code here
end
usage : basically any output from the code is sent to / dev / null no_ouput do ... code here end