Sha256: e7550c3d3c8a0096b8e570f03720fdf46aa59723ee703bdc6a908267bda6d45f
Contents?: true
Size: 997 Bytes
Versions: 2
Compression:
Stored size: 997 Bytes
Contents
require 'spec_helper' describe StationStatus do describe '#new' do context 'Can create Status with proper values' do let(:status) { StationStatus.new 'AB', available_bikes= 2, available_bike_stands=4 } it 'has proper name' do expect(status.name).to eq 'AB' end it 'has proper bike stand' do expect(status.available_bikes).to eq 2 end it 'has proper bike' do expect(status.available_bike_stands).to eq 4 end end describe 'from_hash' do context 'handle valid input values' do let(:data) { { name: 'station', available_bikes: 2, available_bike_stands:4 } } let(:status) { StationStatus.from_hash(data) } it 'capitalize station name' do expect(status.name).to eq 'Station' end it { expect(status.available_bikes).to eq 2 } end context 'wrong input values' # TODO: define which error to grab end end describe 'Boolean status working' do end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
velibe-0.2.0 | spec/station_status_spec.rb |
velibe-0.1.1 | spec/station_status_spec.rb |