Skip to content

Commit

Permalink
Update lib/rubocop/cop/rspec/rails/http_status.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Quorning <[email protected]>
  • Loading branch information
ydah and bquorning authored Sep 4, 2023
1 parent a97d8c7 commit 7282c8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/rubocop/cop/rspec/rails/http_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ def number
node.source.to_i
end

def nomalize_str
nomalized = node.source.delete('"')
if nomalized.match?(/\A\d+\z/)
::Rack::Utils::SYMBOL_TO_STATUS_CODE.key(nomalized.to_i)
def normalize_str
normalized = node.source.delete('"')
if normalized.match?(/\A\d+\z/)
::Rack::Utils::SYMBOL_TO_STATUS_CODE.key(normalized.to_i)
else
nomalized
normalized
end
end
end
Expand Down

0 comments on commit 7282c8e

Please sign in to comment.