1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

This spec wasn't really working right.

This commit is contained in:
Scott Barron 2008-08-13 17:56:16 -04:00
parent 54c631e3cb
commit cd4f9146aa

View file

@ -31,9 +31,11 @@ end
describe AASM::SupportingClasses::Event, 'when firing an event' do describe AASM::SupportingClasses::Event, 'when firing an event' do
it 'should raise an AASM::InvalidTransition error if the transitions are empty' do it 'should raise an AASM::InvalidTransition error if the transitions are empty' do
event = AASM::SupportingClasses::Event.new(:event) obj = mock('object')
obj.stub!(:aasm_current_state)
lambda { event.fire(nil) }.should raise_error(AASM::InvalidTransition) event = AASM::SupportingClasses::Event.new(:event)
lambda { event.fire(obj) }.should raise_error(AASM::InvalidTransition)
end end
it 'should return the state of the first matching transition it finds' do it 'should return the state of the first matching transition it finds' do