Sha256: 0ff3b9ab91c6a770d7866ca00c8da1508d5a9c8e10786f1ef68280f9116f9771

Contents?: true

Size: 448 Bytes

Versions: 8

Compression:

Stored size: 448 Bytes

Contents

require 'spec_helper'

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

  specify { expect(shb.get('/').parsed_response).to be_a Nokogiri::HTML::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/html_spec.rb
shb-0.1.3 spec/html_spec.rb
shb-0.1.2 spec/html_spec.rb
shb-0.1.1 spec/html_spec.rb
shb-0.1.0 spec/html_spec.rb
shb-0.0.4 spec/html_spec.rb
shb-0.0.3 spec/html_spec.rb
shb-0.0.2 spec/html_spec.rb