1 require File.dirname(__FILE__) + '/helper'
3 class TestBehavior < Test::Unit::TestCase
4 def test_generate_should_return_an_object_corresponding_to_the_given_type
5 assert_equal Behaviors::FakeBehavior, Behavior.generate(:fake_behavior, nil).class
8 def test_generate_should_raise_on_invalid_type
9 assert_raise NoSuchBehaviorError do
10 Behavior.generate(:foo, nil)
15 Syslog.expects(:err).with('foo')
16 # Kernel.expects(:puts).with('foo')
18 assert !Behavior.allocate.bypass.complain('foo')