Using RighAWS gem, & mocking at http level so that RightAWS code is being executed as part of tests

I'm using the RighAWS gem, and mocking at the http level so that the RightAWS code is being executed as part of my tests.

When this happens I get the following output

....New RightAws::S3Interface using per_request-connection mode
Opening new HTTP connection to s3.amazonaws.com:80
.New RightAws::S3Interface using per_request-connection mode
.

Even though all the tests pass, when I do have errors its harder to scan them because of this output. is there a nice way to silence it?

Tagged:

Comments

  • you can use null device for logging:

    s3 = RightAws::S3Interface.new(access_key, secret_key, {:port => 80, :protocol => 'http', :logger => Logger.new('/dev/null')}) //on unix system
    s3 = RightAws::S3Interface.new(access_key, secret_key, {:port => 80, :protocol => 'http', :logger => Logger.new('NUL')}) //on windows

Sign In or Register to comment.