Sha256: 0ea9e64d5a352e9580ee529d127479e146b7667fd7a9454a762383211df067db

Contents?: true

Size: 684 Bytes

Versions: 2

Compression:

Stored size: 684 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

2 entries across 2 versions & 1 rubygems

Version Path
tower_bridge_lifts-1.0.2 spec/tower_bridge_lifts_spec.rb
tower_bridge_lifts-1.0.1 spec/tower_bridge_lifts_spec.rb