Sha256: 25a85764de78f0a6aadbc8d10636e4767a831aaa03c4feaad18d8c0ef0b2d4b7

Contents?: true

Size: 358 Bytes

Versions: 4

Compression:

Stored size: 358 Bytes

Contents

require 'json'

module Apress
  module Api
    module Rspec
      module Utils
        def dump_response
          <<-EOS.strip_heredoc
            Request: #{request.method} #{request.original_url}
            Status: #{response.code}
            #{JSON.pretty_generate(JSON.parse(response.body.to_s))}
          EOS
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
apress-api-1.24.0 lib/apress/api/rspec/utils.rb
apress-api-1.23.0 lib/apress/api/rspec/utils.rb
apress-api-1.22.1 lib/apress/api/rspec/utils.rb
apress-api-1.22.0 lib/apress/api/rspec/utils.rb