Sha256: 8d26ee25ca9c78f7d69c3d5ff1e4f7f2d3b573e77a17b2dd3f8befb81b8ee6ac

Contents?: true

Size: 563 Bytes

Versions: 2

Compression:

Stored size: 563 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

describe "TFL Tube Stations" do
  
  it "should return empty when no feed url provided" do
    stations = TflTubeStations.get_stations
    stations.size.should == 0
  end
  
  it "should return stations when feed url provided" do
    FakeWeb.register_uri(:get, "http://test/feed", :body => File.expand_path('spec/feed.xml'))
    
    TflTubeStations::feed_url = "http://test/feed"
    stations = TflTubeStations.get_stations
    stations.size.should == 5
    stations[0].name.should == "Acton Town"
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kalv-tfl-tube-stations-0.1.0 spec/tfl_tube_stations_spec.rb
kalv-tfl-tube-stations-0.1.1 spec/tfl_tube_stations_spec.rb