Sha256: 11bed0707cd3075e71c31318446ed4a08cfd8b4a07f9c3f6ef3bee1f3fe257a5

Contents?: true

Size: 685 Bytes

Versions: 1

Compression:

Stored size: 685 Bytes

Contents

require 'spec_helper'

describe TowerBridgeLifts do
  it 'gem has a version number' do
    expect(TowerBridgeLifts::VERSION).not_to be nil
  end
end
  

describe TowerBridgeLifts::Base do
  subject(:tbl) { described_class.new }

  it 'instantiates' do
    expect(tbl).to be_instance_of(described_class)
    expect(tbl.updated).not_to be_nil
  end

  it 'has lifts if no errors' do 
    if tbl.error.nil?
      expect(tbl.lifts.map).to all(be_a(TowerBridgeLifts::Lift))
    end
  end

  it 'has one lift' do
    lift = TowerBridgeLifts::Lift.new(timestamp: Time.now, vessel: "Vessel Name", direction: :up_river)
    tbl.lifts = [lift]
    expect(tbl.lifts.count).to eq(1) 
  end

end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tower_bridge_lifts-1.0.0 spec/tower_bridge_lifts_spec.rb