diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-20 08:52:48 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-20 08:52:48 +0100 |
commit | 206c5643aae40b0884d42fdb8caeb3f763936fa9 (patch) | |
tree | 608f5cc7daab7b58b3d159429c595303e7e1c7d4 /activemodel/test/state_machine/state_test.rb | |
parent | fb1eebac940d0648d1640d20a24f085d901d6f30 (diff) | |
parent | 20a346170cf3922d16e265487cfb1abcc85383c1 (diff) | |
download | rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.tar.gz rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.tar.bz2 rails-206c5643aae40b0884d42fdb8caeb3f763936fa9.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activemodel/test/state_machine/state_test.rb')
-rw-r--r-- | activemodel/test/state_machine/state_test.rb | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/activemodel/test/state_machine/state_test.rb b/activemodel/test/state_machine/state_test.rb index daaf0829f0..319ac82d9b 100644 --- a/activemodel/test/state_machine/state_test.rb +++ b/activemodel/test/state_machine/state_test.rb @@ -43,32 +43,30 @@ class StateTest < ActiveModel::TestCase assert_equal new_state, new_state end - uses_mocha 'state actions' do - test 'should send a message to the record for an action if the action is present as a symbol' do - state = new_state(:entering => :foo) + test 'should send a message to the record for an action if the action is present as a symbol' do + state = new_state(:entering => :foo) - record = stub - record.expects(:foo) + record = stub + record.expects(:foo) - state.call_action(:entering, record) - end + state.call_action(:entering, record) + end - test 'should send a message to the record for an action if the action is present as a string' do - state = new_state(:entering => 'foo') + test 'should send a message to the record for an action if the action is present as a string' do + state = new_state(:entering => 'foo') - record = stub - record.expects(:foo) + record = stub + record.expects(:foo) - state.call_action(:entering, record) - end + state.call_action(:entering, record) + end - test 'should call a proc, passing in the record for an action if the action is present' do - state = new_state(:entering => Proc.new {|r| r.foobar}) + test 'should call a proc, passing in the record for an action if the action is present' do + state = new_state(:entering => Proc.new {|r| r.foobar}) - record = stub - record.expects(:foobar) - - state.call_action(:entering, record) - end + record = stub + record.expects(:foobar) + + state.call_action(:entering, record) end end |