Sha256: 52113e9393d1452df6b07181e71676b324255fd5ad7e3a8013841c69184dd169

Contents?: true

Size: 370 Bytes

Versions: 9

Compression:

Stored size: 370 Bytes

Contents

class ResponseJsonSyntaxChecker < Checker

  # checks if the given testcase body represents syntactically valid JSON
  def check
    result = Result.new(@testcase, @response)
    if not valid_json?(@response.body)
      result.succeeded = false
      result.error_message = "expected valid JSON in body\n got --#{@response.body[1..400]}--"
    end
    result
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
apirunner-0.3.5 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.3.4 lib/plugins/response_json_syntax_checker.rb
apirunner-0.3.3 lib/plugins/response_json_syntax_checker.rb
apirunner-0.3.2 lib/plugins/response_json_syntax_checker.rb
apirunner-0.3.1 lib/plugins/response_json_syntax_checker.rb
apirunner-0.3.0 lib/plugins/response_json_syntax_checker.rb
apirunner-0.2.8 lib/plugins/response_json_syntax_checker.rb
apirunner-0.2.7 lib/plugins/response_json_syntax_checker.rb
apirunner-0.2.6 lib/plugins/response_json_syntax_checker.rb