Sha256: 3d8fa87108b5afb3f331719fb1b099ec28da6efb82bcb001fc122d6cb7ace5c5

Contents?: true

Size: 837 Bytes

Versions: 1

Compression:

Stored size: 837 Bytes

Contents

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

class GoodCase < Module
    def go definition, report
        super

        definition.methods.each do |method|
            default_case = BoundaryCase.new definition.url, method.request.default_payload, method.request.default_headers
            response = self.call method, definition.url, default_case
            test = GoodCaseTest.new response, definition.url, method
            self.report.reports.concat test.check
        end

        self.report.reports == []
    end

    def order
        1
    end
end


class GoodCaseTest < MethodCaseTest
    def initialize response, url, method
        super response, method.request.default_payload, method.expected_response, url, method.verb, "GoodCaseModule"
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
api-tester-0.0.3 lib/tester/modules/good_case.rb