Sha256: 638dc361ef7d3e82de787044451d4a27efa3303e632314558517c09b66fa208e

Contents?: true

Size: 696 Bytes

Versions: 3

Compression:

Stored size: 696 Bytes

Contents

class Report
  attr_accessor :description
  attr_accessor :url
  attr_accessor :request
  attr_accessor :expected_response
  attr_accessor :actual_response

  def initialize description, url, request, expected_response, actual_response
    self.description = description
    self.url = url
    self.request = request
    self.expected_response = expected_response
    self.actual_response = actual_response
  end

  def print
    puts "#{self.description}: "
    puts "   Requested #{self.url} with payload:"
    puts "      #{self.request.to_json}"
    puts "   Expecting: "
    puts "      #{self.expected_response}"
    puts "   Receiving: "
    puts "      #{self.actual_response}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
api-tester-0.0.4 lib/tester/reporter/report.rb
api-tester-0.0.3 lib/tester/reporter/report.rb
api-tester-0.0.1 lib/tester/reporter/report.rb