Sha256: 2c0aa83bd53fecc219c78a8ccf12a4de1799b7f3dd9c6d6180e438184d116353
Contents?: true
Size: 526 Bytes
Versions: 7
Compression:
Stored size: 526 Bytes
Contents
require File.dirname(__FILE__) + '/helper' class TestBehavior < Test::Unit::TestCase def test_generate_should_return_an_object_corresponding_to_the_given_type assert_equal Behaviors::FakeBehavior, Behavior.generate(:fake_behavior, nil).class end def test_generate_should_raise_on_invalid_type assert_raise NoSuchBehaviorError do Behavior.generate(:foo, nil) end end def test_complain SysLogger.expects(:log).with(:error, 'foo') assert !Behavior.allocate.bypass.complain('foo') end end
Version data entries
7 entries across 7 versions & 1 rubygems