Sha256: 4d6d1e3be5db10592207ff2ab65a3ac2e6a04a8eecf8a16e379a90d825f43f95
Contents?: true
Size: 396 Bytes
Versions: 4
Compression:
Stored size: 396 Bytes
Contents
# encoding: utf-8 require 'spec_helper' RSpec.describe FiniteMachine, '.event_names' do it "retrieves all event names" do fsm = FiniteMachine.define do initial :green events { event :start, :red => :green event :stop, :green => :red } end expect(fsm.current).to eql(:green) expect(fsm.event_names).to eql([:init, :start, :stop]) end end
Version data entries
4 entries across 4 versions & 1 rubygems