Sha256: d489b36b6d76a11d815a5f4d88ec057d2dd7fad02f63376e54b5a79a0ee0d932

Contents?: true

Size: 408 Bytes

Versions: 4

Compression:

Stored size: 408 Bytes

Contents

require "spec_helper"

describe DiscountNetwork::Response do
  describe "#parse" do
    it "parses the json content in object" do
      response = DiscountNetwork::Response.new(json_data).parse

      expect(response.data).to eq("Pong!")
      expect(response.class).to eq(DiscountNetwork::ResponseObject)
    end
  end

  def json_data
    @json_content ||= File.read("./spec/fixtures/ping.json")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
discountnetwork-0.1.3 spec/discountnetwork/response_spec.rb
discountnetwork-0.1.2 spec/discountnetwork/response_spec.rb
discountnetwork-0.1.1 spec/discountnetwork/response_spec.rb
discountnetwork-0.1.0 spec/discountnetwork/response_spec.rb