Sha256: 24b6bd7f14ac28614b86b5b9d80ded47ed446ea95d92f5d8c54a800e2e2bb691

Contents?: true

Size: 458 Bytes

Versions: 7

Compression:

Stored size: 458 Bytes

Contents

require 'spec_helper'

describe Nominatim::Client do
  after do
    WebMock.reset!
  end

  describe '#get' do
    before do
      stub_get('/search').to_return(body: "[]")
    end

    it 'requests the correct resource' do
      Nominatim::Client.new.get('/search')
      a_get('/search').should have_been_requested
    end

    it 'parses the body' do
      response = Nominatim::Client.new.get('/search')
      response.body.should eq []
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
nominatim-0.0.6 spec/nominatim/client_spec.rb
parallel588_nominatim-0.0.7 spec/nominatim/client_spec.rb
nominatim-0.0.5 spec/nominatim/client_spec.rb
nominatim-0.0.4 spec/nominatim/client_spec.rb
nominatim-0.0.3 spec/nominatim/client_spec.rb
nominatim-0.0.2 spec/nominatim/client_spec.rb
nominatim-0.0.1 spec/nominatim/client_spec.rb