Sha256: bbe7f5b44134d302f35de4ea632cd56c1ba15df4a3646476194ed7e17a16a2d4

Contents?: true

Size: 445 Bytes

Versions: 8

Compression:

Stored size: 445 Bytes

Contents

require 'spec_helper'

describe Shb::Client do
  before do 
    stub_request(:any, 'supremegolf.com').to_return {|r| 
      {
        body: '<xml><title>Test</title></xml>', 
        headers: {'Content-Type' => 'text/xml'}
      }
    }
  end
  let(:shb) { Shb::Client.new }

  specify { expect(shb.get('/').parsed_response).to be_a Nokogiri::XML::Document }
  specify { expect(shb.get('/').parsed_response.at('title').text).to eq 'Test' }
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shb-0.1.4 spec/xml_spec.rb
shb-0.1.3 spec/xml_spec.rb
shb-0.1.2 spec/xml_spec.rb
shb-0.1.1 spec/xml_spec.rb
shb-0.1.0 spec/xml_spec.rb
shb-0.0.4 spec/xml_spec.rb
shb-0.0.3 spec/xml_spec.rb
shb-0.0.2 spec/xml_spec.rb