1 require File.join(File.dirname(__FILE__), *%w[.. lib god])
13 abort "=> You need the Mocha gem to run these tests."
20 class AbortCalledError < StandardError
25 raise AbortCalledError.new("abort called")
29 raise AbortCalledError.new("abort called")
34 class FakeCondition < Condition
40 class FakePollCondition < PollCondition
46 class FakeEventCondition < EventCondition
54 class FakeBehavior < Behavior
60 old_verbose, $VERBOSE = $VERBOSE, nil
63 $VERBOSE = old_verbose
66 # This allows you to be a good OOP citizen and honor encapsulation, but
67 # still make calls to private methods (for testing) by doing
69 # obj.bypass.private_thingie(arg1, arg2)
71 # Which is easier on the eye than
73 # obj.send(:private_thingie, arg1, arg2)
77 instance_methods.each do |m|
78 undef_method m unless m =~ /^__/
85 def method_missing(sym, *args)
86 @ref.__send__(sym, *args)