File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 116
116
end
117
117
118
118
describe JRuby ::Rack ::ServletLog do
119
+ let ( :servlet_context_logger ) do
120
+ org . jruby . rack . logging . ServletContextLogger . new ( servlet_context )
121
+ end
119
122
120
123
it "writes messages to the servlet context" do
121
- JRuby ::Rack . context = rack_context = double ( 'context' )
124
+ JRuby ::Rack . context = servlet_context_logger
122
125
servlet_log = JRuby ::Rack . send ( :servlet_log )
123
- rack_context . should_receive ( :log ) . with ( /hello/ )
124
126
servlet_log . write "hello"
125
- rack_context . should_receive ( :log ) . with ( /hoja! /)
127
+ expect ( real_logger . logged_content ) . to match ( /hello /)
126
128
servlet_log . puts "hoja!hoj"
129
+ expect ( real_logger . logged_content ) . to match ( /hoja!/ )
127
130
servlet_log . close
128
131
end
129
-
130
132
end
131
-
132
133
end
You can’t perform that action at this time.
0 commit comments