Sha256: 60ea4f2e166e70589e2bba17b038f6b14d59d4264d7b3478e4dcf65096b24bd6
Contents?: true
Size: 1.04 KB
Versions: 14
Compression:
Stored size: 1.04 KB
Contents
require_relative '../test_helper' require_relative '../files/models/vehicle' class VehicleIdlingTest < MiniTest::Test def setup @vehicle = Vehicle.new @vehicle.ignite end def test_should_be_in_idling_state assert_equal 'idling', @vehicle.state end def test_should_be_idling assert @vehicle.idling? end def test_should_have_seatbelt_on assert @vehicle.seatbelt_on end def test_should_track_time_elapsed refute_nil @vehicle.time_elapsed end def test_should_allow_park assert @vehicle.park end def test_should_call_park_with_bang_action class << @vehicle def park super && 1 end end assert_equal 1, @vehicle.park! end def test_should_not_allow_idle refute @vehicle.idle end def test_should_allow_shift_up assert @vehicle.shift_up end def test_should_not_allow_shift_down refute @vehicle.shift_down end def test_should_not_allow_crash refute @vehicle.crash end def test_should_not_allow_repair refute @vehicle.repair end end
Version data entries
14 entries across 14 versions & 2 rubygems