Sha256: 434686c64c01d0409acd3d6f798a5ad46d45aa6c4e048ee8f49a67ff31867901

Contents?: true

Size: 426 Bytes

Versions: 6

Compression:

Stored size: 426 Bytes

Contents

require 'json'
require 'serial_spec/parsed_body'

module SerialSpec
  module RequestResponse
    module Helpers
      extend ActiveSupport::Concern

      def status
        response.status
      end

      def headers
        response.headers
      end

      def response
        last_response
      end

      def body
        @body ||= begin
          ParsedBody.new(response.body)
        end
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
serial-spec-0.4.1 lib/serial_spec/request_response/helpers.rb
serial-spec-0.4.0 lib/serial_spec/request_response/helpers.rb
serial-spec-0.3.1 lib/serial_spec/request_response/helpers.rb
serial-spec-0.3.0 lib/serial_spec/request_response/helpers.rb
serial-spec-0.2.1 lib/serial_spec/request_response/helpers.rb
serial-spec-0.2.0 lib/serial_spec/request_response/helpers.rb