Skip to content

Commit

Permalink
new aasm unit spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Distad committed Oct 3, 2008
1 parent f2c5380 commit ea29d09
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/unit/aasm_spec.rb
Expand Up @@ -147,6 +147,16 @@ def foo.aasm_write_state
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

Expand Down

0 comments on commit ea29d09

Please sign in to comment.