From 74cb05698684f237a7eb91afadec0020d8910c70 Mon Sep 17 00:00:00 2001 From: rick Date: Sat, 28 Jun 2008 09:19:44 -0700 Subject: add basic events and transitions. still more tests to convert --- activemodel/test/state_machine/state_test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activemodel/test/state_machine/state_test.rb') diff --git a/activemodel/test/state_machine/state_test.rb b/activemodel/test/state_machine/state_test.rb index 444435d271..22d0d9eb93 100644 --- a/activemodel/test/state_machine/state_test.rb +++ b/activemodel/test/state_machine/state_test.rb @@ -10,12 +10,12 @@ end class StateTest < ActiveModel::TestCase def setup @name = :astate - @options = { :crazy_custom_key => 'key' } @machine = StateTestSubject.state_machine + @options = { :crazy_custom_key => 'key', :machine => @machine } end def new_state(options={}) - ActiveModel::StateMachine::State.new(options.delete(:machine) || @machine, @name, @options.merge(options)) + ActiveModel::StateMachine::State.new(@name, @options.merge(options)) end test 'sets the name' do @@ -31,6 +31,7 @@ class StateTest < ActiveModel::TestCase end test 'sets the options and expose them as options' do + @options.delete(:machine) assert_equal @options, new_state.options end -- cgit v1.2.3