spec/spec_helper.rb in lita-locker-1.0.10 vs spec/spec_helper.rb in lita-locker-1.1.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'simplecov'
require 'coveralls'
SimpleCov.formatters = [
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
@@ -10,15 +12,18 @@
require 'lita/rspec'
Lita.version_3_compatibility_mode = false
RSpec.configure do |config|
config.before do
- registry.register_handler(Lita::Handlers::Locker)
- registry.register_handler(Lita::Handlers::LockerEvents)
- registry.register_handler(Lita::Handlers::LockerHttp)
- registry.register_handler(Lita::Handlers::LockerLabels)
- registry.register_handler(Lita::Handlers::LockerMisc)
- registry.register_handler(Lita::Handlers::LockerResources)
+ if defined? registry
+ registry.register_hook(:trigger_route, Lita::Extensions::KeywordArguments)
+ registry.register_handler(Lita::Handlers::Locker)
+ registry.register_handler(Lita::Handlers::LockerEvents)
+ registry.register_handler(Lita::Handlers::LockerHttp)
+ registry.register_handler(Lita::Handlers::LockerLabels)
+ registry.register_handler(Lita::Handlers::LockerMisc)
+ registry.register_handler(Lita::Handlers::LockerResources)
+ end
end
end
RSpec.configure do |config|
config.expect_with :rspec do |expectations|