mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
new aasm unit spec
This commit is contained in:
parent
f2c5380807
commit
ea29d0960e
1 changed files with 10 additions and 0 deletions
|
@ -147,6 +147,16 @@ describe AASM, '- event firing with persistence' do
|
|||
foo.close!
|
||||
end
|
||||
|
||||
it 'should return true if aasm_write_state is defined and returns true' do
|
||||
foo = Foo.new
|
||||
|
||||
def foo.aasm_write_state(state)
|
||||
true
|
||||
end
|
||||
|
||||
foo.close!.should be_true
|
||||
end
|
||||
|
||||
it 'should return false if aasm_write_state is defined and returns false' do
|
||||
foo = Foo.new
|
||||
|
||||
|
|
Loading…
Reference in a new issue