92
93
94
95
96
97
98
99
100
101
102
103
|
# File 'lib/fitting/doc/content_type.rb', line 92
def cover!(log)
if @step_key == log.content_type && log.content_type == 'application/json'
@step_cover_size += 1
@logs.push(log.body)
@next_steps.each { |json_schema| json_schema.cover!(log) }
elsif @step_key != 'application/json' && log.content_type != 'application/json'
@step_cover_size += 1
end
rescue Fitting::Doc::JsonSchema::NotFound => e
raise NotFound.new "content-type: #{@step_key}\n\n"\
"#{e.message}"
end
|