Sha256: accc1b732da0d5b95b04f0eab554b32339840b221d55bf5487dbf12c267ab3d4

Contents?: true

Size: 741 Bytes

Versions: 1

Compression:

Stored size: 741 Bytes

Contents

require 'tester/reporter/status_code_report'
require 'tester/modules/module'
require 'tester/method_case_test'

class Format < Module
  def go definition, report
    super

    definition.methods.each do |method|
      cases = method.request.cases
      cases.each do |format_case|
        response = self.call method, format_case
        test = FormatTest.new response, format_case.payload, definition.bad_request_response, method.url, method.verb
        self.report.reports.concat test.check
      end
    end

    report.reports == []
  end
end

class FormatTest < MethodCaseTest
    def initialize response, payload, expected_response, url, verb
        super response, payload, expected_response, url, verb, "FormatModule"
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
api-tester-0.0.1 lib/tester/modules/format.rb