Sha256: cd11b13622e20b90336c8a2a0c80524553de92e5bf7f666f37c015c7c8d4a308
Contents?: true
Size: 499 Bytes
Versions: 8
Compression:
Stored size: 499 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe FiniteMachine, '#inspect' do it "print useful information about state machine" do fsm = FiniteMachine.define do initial :green events { event :slow, :green => :yellow event :stop, :yellow => :red } end expect(fsm.inspect).to match(/^<#FiniteMachine::StateMachine:0x#{fsm.object_id.to_s(16)} @states=\[:none, :green, :yellow, :red\], @events=\[:init, :slow, :stop\], @transitions=.*$/) end end
Version data entries
8 entries across 8 versions & 1 rubygems