Skip to content

Commit c7d9e98

Browse files
committed
rb: Silence WEBrick output in specs
1 parent 8b359c3 commit c7d9e98

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

rb/spec/integration/selenium/webdriver/spec_support/rack_server.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def start
5050
end
5151

5252
def run
53-
handler.run @app, :Host => @host, :Port => @port
53+
handler.run @app, run_options_for(handler)
5454
end
5555

5656
def where_is(file)
@@ -90,6 +90,16 @@ def load_handler(handler)
9090
false
9191
end
9292

93+
def run_options_for(handler)
94+
run_opts = {:Host => @host, :Port => @port}
95+
96+
if handler == Rack::Handler::WEBrick
97+
run_opts.merge!(:Logger => WEBrick::Log.new("/dev/null"), :AccessLog => [])
98+
end
99+
100+
run_opts
101+
end
102+
93103
def start_forked
94104
@pid = fork { run }
95105
end

0 commit comments

Comments
 (0)