Sha256: 43c563c13300744e890e63b92f451e2f89222c1282d4e0c129fb0398e35fd590

Contents?: true

Size: 601 Bytes

Versions: 5

Compression:

Stored size: 601 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe BikePOA::Client do
  describe 'parses latest bikepoa status' do
    it 'extracts the status of several stations' do
      BikePOA::HttpClient.any_instance.should_receive(:fetch).and_return('html-file')
      BikePOA::MapParser.any_instance.should_receive(:parse).with('html-file').and_return(%w[line1 line2])
      BikePOA::Station.should_receive(:new).with('line1').and_return('station1')
      BikePOA::Station.should_receive(:new).with('line2').and_return('station2')

      subject.stations.should include('station1','station2')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bikepoa-tools-0.4.0 spec/client_spec.rb
bikepoa-tools-0.3.1 spec/client_spec.rb
bikepoa-tools-0.3.0 spec/client_spec.rb
bikepoa-tools-0.2.0 spec/client_spec.rb
bikepoa-tools-0.1.0 spec/client_spec.rb