Sha256: 239c6fb14a50c3780d3fa55315e3570eef3ac4e60df639daed0cbb82acc042a8

Contents?: true

Size: 799 Bytes

Versions: 14

Compression:

Stored size: 799 Bytes

Contents

require_relative '../test_helper'
require_relative '../files/models/vehicle'

class VehicleSecondGearTest < MiniTest::Test
  def setup
    @vehicle = Vehicle.new
    @vehicle.ignite
    2.times { @vehicle.shift_up }
  end

  def test_should_be_in_second_gear_state
    assert_equal 'second_gear', @vehicle.state
  end

  def test_should_be_second_gear
    assert @vehicle.second_gear?
  end

  def test_should_not_allow_park
    refute @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_allow_shift_down
    assert @vehicle.shift_down
  end

  def test_should_allow_crash
    assert @vehicle.crash
  end

  def test_should_not_allow_repair
    refute @vehicle.repair
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
state_machines-0.5.0 test/functional/vehicle_second_gear_test.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/state_machines-0.2.2/test/functional/vehicle_second_gear_test.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/state_machines-0.2.2/test/functional/vehicle_second_gear_test.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/state_machines-0.2.2/test/functional/vehicle_second_gear_test.rb
state_machines-0.4.0 test/functional/vehicle_second_gear_test.rb
state_machines-0.3.0 test/functional/vehicle_second_gear_test.rb
state_machines-0.2.2 test/functional/vehicle_second_gear_test.rb
state_machines-0.2.1 test/functional/vehicle_second_gear_test.rb
state_machines-0.2.0 test/functional/vehicle_second_gear_test.rb
state_machines-0.1.4 test/functional/vehicle_second_gear_test.rb
state_machines-0.1.3 test/functional/vehicle_second_gear_test.rb
state_machines-0.1.2 test/functional/vehicle_second_gear_test.rb
state_machines-0.1.1 test/functional/vehicle_second_gear_test.rb
state_machines-0.1.0 test/functional/vehicle_second_gear_test.rb