From 0492759db338a01623672674408a0bed62951ac6 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 22 Nov 2008 18:21:48 -0800 Subject: MiniTest compat: don't shadow @name --- activemodel/test/state_machine/event_test.rb | 6 +++--- activemodel/test/state_machine/state_test.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'activemodel/test/state_machine') diff --git a/activemodel/test/state_machine/event_test.rb b/activemodel/test/state_machine/event_test.rb index 45adb4298a..8fb7e82ec2 100644 --- a/activemodel/test/state_machine/event_test.rb +++ b/activemodel/test/state_machine/event_test.rb @@ -2,18 +2,18 @@ require 'test_helper' class EventTest < ActiveModel::TestCase def setup - @name = :close_order + @state_name = :close_order @success = :success_callback end def new_event - @event = ActiveModel::StateMachine::Event.new(nil, @name, {:success => @success}) do + @event = ActiveModel::StateMachine::Event.new(nil, @state_name, {:success => @success}) do transitions :to => :closed, :from => [:open, :received] end end test 'should set the name' do - assert_equal @name, new_event.name + assert_equal @state_name, new_event.name end test 'should set the success option' do diff --git a/activemodel/test/state_machine/state_test.rb b/activemodel/test/state_machine/state_test.rb index 319ac82d9b..fbf9ce7b0a 100644 --- a/activemodel/test/state_machine/state_test.rb +++ b/activemodel/test/state_machine/state_test.rb @@ -9,13 +9,13 @@ end class StateTest < ActiveModel::TestCase def setup - @name = :astate + @state_name = :astate @machine = StateTestSubject.state_machine @options = { :crazy_custom_key => 'key', :machine => @machine } end def new_state(options={}) - ActiveModel::StateMachine::State.new(@name, @options.merge(options)) + ActiveModel::StateMachine::State.new(@state_name, @options.merge(options)) end test 'sets the name' do -- cgit v1.2.3