class CarBackingUpTest

Public Instance Methods

setup() click to toggle source
# File test/functional/state_machine_test.rb, line 911
def setup
  @car = Car.new
  @car.reverse
end
test_should_allow_idle() click to toggle source
# File test/functional/state_machine_test.rb, line 928
def test_should_allow_idle
  assert @car.idle
end
test_should_allow_park() click to toggle source
# File test/functional/state_machine_test.rb, line 920
def test_should_allow_park
  assert @car.park
end
test_should_allow_shift_up() click to toggle source
# File test/functional/state_machine_test.rb, line 932
def test_should_allow_shift_up
  assert @car.shift_up
end
test_should_be_in_backing_up_state() click to toggle source
# File test/functional/state_machine_test.rb, line 916
def test_should_be_in_backing_up_state
  assert_equal 'backing_up', @car.state
end
test_should_not_allow_crash() click to toggle source
# File test/functional/state_machine_test.rb, line 940
def test_should_not_allow_crash
  assert !@car.crash
end
test_should_not_allow_ignite() click to toggle source
# File test/functional/state_machine_test.rb, line 924
def test_should_not_allow_ignite
  assert !@car.ignite
end
test_should_not_allow_repair() click to toggle source
# File test/functional/state_machine_test.rb, line 944
def test_should_not_allow_repair
  assert !@car.repair
end
test_should_not_allow_reverse() click to toggle source
# File test/functional/state_machine_test.rb, line 948
def test_should_not_allow_reverse
  assert !@car.reverse
end
test_should_not_allow_shift_down() click to toggle source
# File test/functional/state_machine_test.rb, line 936
def test_should_not_allow_shift_down
  assert !@car.shift_down
end