require 'spec_helper' include Rosemary describe Way do before do WebMock.disable_net_connect! end let :osm do Api.new end def valid_fake_way way=<<-EOF EOF end describe '#find:' do it "should build a Way from API response via get_way" do stub_request(:get, "http://www.openstreetmap.org/api/0.6/way/1234").to_return(:status => 200, :body => valid_fake_way, :headers => {'Content-Type' => 'application/xml'}) way = osm.find_way(1234) expect(way.class).to eql Way expect(way.nodes).to include(15735246) end end describe '#create:' do end describe '#update:' do end describe '#delete:' do end end