Sha256: d6dd65132904bba7a017a68d383724a169bd9ae58ab26b1a9312bea090a8d3a9

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

require 'tester/reporter/status_code_report'
require 'tester/test_helper'

class Module
  attr_accessor :report

  def set_report report
    self.report = report
  end

  def go definition, report
    set_report report
  end

  def order
    5
  end

  def before definition
    definition.test_helper.before
  end

  def after definition
    definition.test_helper.after
  end

  def call method, definition, format_case
    self.before definition
    begin
      response = method.call definition.url, format_case.payload, format_case.headers
    rescue RestClient::ExceptionWithResponse => e
      response = e.response
    end
    self.after definition
    response
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
api-tester-0.0.5 lib/tester/modules/module.rb