spec/support/notifier_helpers.rb in rollbar-2.3.0 vs spec/support/notifier_helpers.rb in rollbar-2.4.0

- old
+ new

@@ -8,9 +8,24 @@ config.framework = "Rails: #{::Rails::VERSION::STRING}" config.request_timeout = 60 end end + def preconfigure_rails_notifier + rails_logger = if defined?(::Rails.logger) + ::Rails.logger + elsif defined?(RAILS_DEFAULT_LOGGER) + RAILS_DEFAULT_LOGGER + end + + Rollbar.preconfigure do |config| + config.logger = rails_logger + config.environment = defined?(::Rails.env) && ::Rails.env || defined?(RAILS_ENV) && RAILS_ENV + config.root = defined?(::Rails.root) && ::Rails.root || defined?(RAILS_ROOT) && RAILS_ROOT + config.framework = defined?(::Rails.version) && "Rails: #{::Rails.version}" || defined?(::Rails::VERSION::STRING) && "Rails: #{::Rails::VERSION::STRING}" + end + end + def test_access_token 'bfec94a1ede64984b862880224edd0ed' end def reset_configuration