File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
main/ruby/jruby/rack/rails Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
module JRuby ::Rack
4
4
class RailsLogger < JRuby ::Rack ::Logger
5
- include ActiveSupport ::LoggerSilence
5
+ include ActiveSupport ::LoggerSilence if defined? ( ActiveSupport :: LoggerSilence )
6
6
end
7
7
end
Original file line number Diff line number Diff line change 185
185
unwrap_logger = "logger = Rails.logger.broadcasts.first;"
186
186
end
187
187
188
- # sanity check logger-silence works:
189
- should_eval_as_eql_to "#{ unwrap_logger } logger.silence { logger.warn('from-integration-spec') }" , true
190
-
191
- should_eval_as_eql_to "#{ unwrap_logger } logger.real_logger.is_a?(org.jruby.rack.logging.ServletContextLogger)" , true
188
+ if Rails ::VERSION ::STRING >= '6.0'
189
+ # sanity check logger-silence works:
190
+ should_eval_as_not_nil "#{ unwrap_logger } defined?(logger.silence)"
191
+ should_eval_as_eql_to "#{ unwrap_logger } logger.silence { logger.warn('from-integration-spec') }" , true
192
+ should_eval_as_eql_to "#{ unwrap_logger } logger.real_logger.is_a?(org.jruby.rack.logging.ServletContextLogger)" , true
193
+ end
192
194
end
193
195
194
196
it "sets up public_path" do
You can’t perform that action at this time.
0 commit comments