class VehicleThirdGearTest

Public Instance Methods

setup() click to toggle source
# File test/functional/state_machine_test.rb, line 610
def setup
  @vehicle = Vehicle.new
  @vehicle.ignite
  3.times {@vehicle.shift_up}
end
test_should_allow_crash() click to toggle source
# File test/functional/state_machine_test.rb, line 640
def test_should_allow_crash
  assert @vehicle.crash
end
test_should_allow_shift_down() click to toggle source
# File test/functional/state_machine_test.rb, line 636
def test_should_allow_shift_down
  assert @vehicle.shift_down
end
test_should_be_in_third_gear_state() click to toggle source
# File test/functional/state_machine_test.rb, line 616
def test_should_be_in_third_gear_state
  assert_equal 'third_gear', @vehicle.state
end
test_should_be_third_gear() click to toggle source
# File test/functional/state_machine_test.rb, line 620
def test_should_be_third_gear
  assert @vehicle.third_gear?
end
test_should_not_allow_idle() click to toggle source
# File test/functional/state_machine_test.rb, line 628
def test_should_not_allow_idle
  assert !@vehicle.idle
end
test_should_not_allow_park() click to toggle source
# File test/functional/state_machine_test.rb, line 624
def test_should_not_allow_park
  assert !@vehicle.park
end
test_should_not_allow_repair() click to toggle source
# File test/functional/state_machine_test.rb, line 644
def test_should_not_allow_repair
  assert !@vehicle.repair
end
test_should_not_allow_shift_up() click to toggle source
# File test/functional/state_machine_test.rb, line 632
def test_should_not_allow_shift_up
  assert !@vehicle.shift_up
end