summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/test.rb b/test.rb
index 39569ee..87cb5bf 100644
--- a/test.rb
+++ b/test.rb
@@ -103,4 +103,27 @@ class TC_State < Test::Unit::TestCase
"BangState{} (down)"
)
end
+
+ def test_release_noop
+ test_epsilon
+ Bar.release(:user)
+ assert_only_states(
+ 'BazState{:tom=>"abc"} (up)',
+ 'FooState{} (down)',
+ 'FooState{:bob=>"abc"} (up)',
+ "BarState{} (up)",
+ "BamState{} (up)",
+ "BangState{} (down)"
+ )
+ end
+
+ def test_drop_cleanup
+ test_release_noop
+ Bar.get_all.each{ |x| x.drop }
+ assert_only_states(
+ 'FooState{} (down)',
+ 'FooState{:bob=>"abc"} (up)',
+ "BarState{} (down)"
+ )
+ end
end