Sha256: ab4d4429c188469eeace46ae70ffecb54ea3cceb6770d0553cb0f8103eb39ffd

Contents?: true

Size: 860 Bytes

Versions: 14

Compression:

Stored size: 860 Bytes

Contents

require_relative '../test_helper'
require_relative '../files/models/car'

class CarTest < MiniTest::Test
  def setup
    @car = Car.new
  end

  def test_should_be_in_parked_state
    assert_equal 'parked', @car.state
  end

  def test_should_not_have_the_seatbelt_on
    refute @car.seatbelt_on
  end

  def test_should_not_allow_park
    refute @car.park
  end

  def test_should_allow_ignite
    assert @car.ignite
    assert_equal 'idling', @car.state
  end

  def test_should_not_allow_idle
    refute @car.idle
  end

  def test_should_not_allow_shift_up
    refute @car.shift_up
  end

  def test_should_not_allow_shift_down
    refute @car.shift_down
  end

  def test_should_not_allow_crash
    refute @car.crash
  end

  def test_should_not_allow_repair
    refute @car.repair
  end

  def test_should_allow_reverse
    assert @car.reverse
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

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