diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-22 18:21:48 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-22 19:19:13 -0800 |
commit | 0492759db338a01623672674408a0bed62951ac6 (patch) | |
tree | 637861f368607c6b06e532fa180b3e487fadc47a /activemodel/test/state_machine | |
parent | 51383c57a2f556d1ea44c93deb68e7b70f8c6e35 (diff) | |
download | rails-0492759db338a01623672674408a0bed62951ac6.tar.gz rails-0492759db338a01623672674408a0bed62951ac6.tar.bz2 rails-0492759db338a01623672674408a0bed62951ac6.zip |
MiniTest compat: don't shadow @name
Diffstat (limited to 'activemodel/test/state_machine')
-rw-r--r-- | activemodel/test/state_machine/event_test.rb | 6 | ||||
-rw-r--r-- | activemodel/test/state_machine/state_test.rb | 4 |
2 files changed, 5 insertions, 5 deletions
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 |