Skip to content

Commit

Permalink
Remove rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjachmann committed Aug 11, 2015
1 parent 834d26b commit cbc2ebe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/assert_json/assert_json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ def initialize(json_string)
end

def size(expected)
raise_error("element #{@decoded_json.inspect} is not sizable") if !@decoded_json.respond_to?(:size)
raise_error("element #{@decoded_json.inspect} has #{@decoded_json.size} items, expected #{expected}") if @decoded_json.size != expected
raise_error("element #{@decoded_json.inspect} is not sizable") unless @decoded_json.respond_to?(:size)
return if @decoded_json.size == expected
raise_error("element #{@decoded_json.inspect} has #{@decoded_json.size} items, expected #{expected}")
end

def item(index)
Expand Down

0 comments on commit cbc2ebe

Please sign in to comment.