lib/rubocop/cop/rspec/rails/http_status.rb in rubocop-rspec-1.36.0 vs lib/rubocop/cop/rspec/rails/http_status.rb in rubocop-rspec-1.37.0
- old
+ new
@@ -105,19 +105,19 @@
# :nodoc:
class NumericStyleChecker
MSG = 'Prefer `%<prefer>s` over `%<current>s` ' \
'to describe HTTP status code.'
- WHITELIST_STATUS = %i[error success missing redirect].freeze
+ ALLOWED_STATUSES = %i[error success missing redirect].freeze
attr_reader :node
def initialize(node)
@node = node
end
def offensive?
- !node.int_type? && !whitelisted_symbol?
+ !node.int_type? && !allowed_symbol?
end
def message
format(MSG, prefer: preferred_style, current: symbol.inspect)
end
@@ -134,11 +134,11 @@
def symbol
node.value
end
- def whitelisted_symbol?
- node.sym_type? && WHITELIST_STATUS.include?(node.value)
+ def allowed_symbol?
+ node.sym_type? && ALLOWED_STATUSES.include?(node.value)
end
end
end
end
end