Is there a method to get logging to output to test.log while running rspec?
-C
module Goliath
module TestHelper
def server(api, port, options = {}, &blk)
op = OptionParser.new
s = Goliath::Server.new
# Make it possible for you to specify a log file in with_api call as Options parameter
s.logger = options[:log_file].nil? ? mock('log').as_null_object : Logger.new(options.delete(:log_file))
s.api = api.new
s.app = Goliath::Rack::Builder.build(api, s.api)
s.api.options_parser(op, options)
s.options = options
s.port = @test_server_port = port
s.start(&blk)
s
end
end
end
....
With that, you can call with_api(YourApi, {:log_file => 'path/to/your/logfile'}) and see the log output in a file.