spec/station_spec.rb in easy_transilien-0.0.9 vs spec/station_spec.rb in easy_transilien-1.0.0

- old
+ new

@@ -1,30 +1,30 @@ require 'spec_helper' describe EasyTransilien::Station do - it 'should get some Station when searching for argenteuil' do + it 'expect get some Station when searching for argenteuil' do col = EasyTransilien::Station.find('argenteuil') - col.is_a?(Array).should be_true - col.first.is_a?(EasyTransilien::Station).should be_true - col.length.should eql(2) + expect(col.is_a?(Array)).to be_truthy + expect(col.first.is_a?(EasyTransilien::Station)).to be_truthy + expect(col.length).to eql(2) end - it 'should get all Station for empty search' do + it 'expect get all Station for empty search' do col = EasyTransilien::Station.find - col.is_a?(Array).should be_true - (col.length > 0).should be_true + expect(col.is_a?(Array)).to be_truthy + expect(col.length > 0).to be_truthy end - it 'should get at least a Line for a Station' do + it 'expect get at least a Line for a Station' do station = EasyTransilien::Station.find('Val d\'Argenteuil').first - station.lines.is_a?(Array).should be_true - (station.lines.length > 0).should be_true - station.lines[0].is_a?(EasyTransilien::Line).should be_true + expect(station.lines.is_a?(Array)).to be_truthy + expect(station.lines.length > 0).to be_truthy + expect(station.lines[0].is_a?(EasyTransilien::Line)).to be_truthy end - it 'should get at least one line_letters for a Station' do + it 'expect get at least one line_letters for a Station' do station = EasyTransilien::Station.find('Val d\'Argenteuil').first - station.codes.is_a?(Array).should be_true - (station.codes.length > 0).should be_true - station.codes[0].is_a?(String).should be_true - station.codes[0].should eql('J') + expect(station.codes.is_a?(Array)).to be_truthy + expect(station.codes.length > 0).to be_truthy + expect(station.codes[0].is_a?(String)).to be_truthy + expect(station.codes[0]).to eql('J') end end