Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test around FSM#transition

  • Loading branch information...
commit 6ca69e616596f871879c4ba3f5db01ed1f282a16 1 parent e3246ed
Joey Butler authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 spec/celluloid/fsm_spec.rb
View
11 spec/celluloid/fsm_spec.rb
@@ -83,4 +83,15 @@ class CustomDefaultMachine
subject.state.should == :pre_done
end
+
+ context "actor is not set" do
+ let(:subject) { TestMachine.new }
+
+ context "transition is delayed" do
+ it "raises an unattached error" do
+ expect { subject.transition :another, :delay => 100 } \
+ .to raise_error(Celluloid::FSM::UnattachedError)
+ end
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.