lib/rubocop/rspec/language.rb in rubocop-rspec-2.14.2 vs lib/rubocop/rspec/language.rb in rubocop-rspec-2.15.0
- old
+ new
@@ -133,12 +133,13 @@
Language.config['Hooks'].include?(element.to_s)
end
end
module HookScopes # :nodoc:
+ ALL = %i[each example context all suite].freeze
def self.all(element)
- Language.config['HookScopes'].include?(element.to_s)
+ ALL.include?(element)
end
end
module Includes # :nodoc:
class << self
@@ -156,11 +157,12 @@
end
end
end
module Runners # :nodoc:
+ ALL = %i[to to_not not_to].freeze
def self.all(element)
- Language.config['Runners'].include?(element.to_s)
+ ALL.include?(element)
end
end
module SharedGroups # :nodoc:
class << self