Sha256: cc254278ababcba2287614010a0ca7495afe1eb4e42fe06e73fe7cd2a4302fbb

Contents?: true

Size: 902 Bytes

Versions: 14

Compression:

Stored size: 902 Bytes

Contents

module Fitting
  class Statistics
    class CoverError
      def initialize(request_unit)
        @request_unit = request_unit
      end

      def to_s
        res = ''
        @request_unit.map do |request|
          request.responses.map do |response|
            next unless response.tested_bodies != []
            response.json_schemas.map do |json_schema|
              json_schema.combinations.map do |combination|
                next unless combination.valid_bodies == []
                res += "request method: #{request.method}\nrequest path: #{request.path}\n"\
                        "response status: #{response.status}\nsource json-schema: #{json_schema.json_schema}\n"\
                       "combination: #{combination.description}\nnew json-schema: #{combination.json_schema}\n\n"
              end
            end
          end
        end
        res
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fitting-2.17.0 lib/fitting/statistics/cover_error.rb
fitting-2.16.1 lib/fitting/statistics/cover_error.rb
fitting-2.16.0 lib/fitting/statistics/cover_error.rb
fitting-2.15.0 lib/fitting/statistics/cover_error.rb
fitting-2.14.1 lib/fitting/statistics/cover_error.rb
fitting-2.14.0 lib/fitting/statistics/cover_error.rb
fitting-2.13.1 lib/fitting/statistics/cover_error.rb
fitting-2.13.0 lib/fitting/statistics/cover_error.rb
fitting-2.12.1 lib/fitting/statistics/cover_error.rb
fitting-2.12.0 lib/fitting/statistics/cover_error.rb
fitting-2.11.0 lib/fitting/statistics/cover_error.rb
fitting-2.10.0 lib/fitting/statistics/cover_error.rb
fitting-2.9.1 lib/fitting/statistics/cover_error.rb
fitting-2.9.0 lib/fitting/statistics/cover_error.rb