diff options
Diffstat (limited to 'activemodel/test/state_machine/state_test.rb')
-rw-r--r-- | activemodel/test/state_machine/state_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 |