We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d64fa0a commit 57b65f7Copy full SHA for 57b65f7
1 file changed
src/spec/ruby/jruby/rack/logger_spec.rb
@@ -116,17 +116,18 @@
116
end
117
118
describe JRuby::Rack::ServletLog do
119
+ let(:servlet_context_logger) do
120
+ org.jruby.rack.logging.ServletContextLogger.new(servlet_context)
121
+ end
122
123
it "writes messages to the servlet context" do
- JRuby::Rack.context = rack_context = double('context')
124
+ JRuby::Rack.context = servlet_context_logger
125
servlet_log = JRuby::Rack.send(:servlet_log)
- rack_context.should_receive(:log).with(/hello/)
126
servlet_log.write "hello"
- rack_context.should_receive(:log).with(/hoja!/)
127
+ expect(real_logger.logged_content).to match(/hello/)
128
servlet_log.puts "hoja!hoj"
129
+ expect(real_logger.logged_content).to match(/hoja!/)
130
servlet_log.close
131
-
132
133
0 commit comments