lib/fitting/nocov.rb in fitting-4.0.0 vs lib/fitting/nocov.rb in fitting-4.0.1
- old
+ new
@@ -27,9 +27,13 @@
if @code == nil
return res if res.present?
raise NotFound.new("host: #{@host}, method: #{@method}, path: #{@path}")
end
+ if res == nil
+ raise NotFound.new("host: #{@host}, method: #{@method}, path: #{@path}")
+ end
+
res_code = res.responses.find { |response| response.step_key == @code.to_s }
if @content_type == nil
return res_code if res_code.present?
raise NotFound.new("host: #{@host}, method: #{@method}, path: #{@path}, code: #{@code}")