1 require File.join(File.dirname(__FILE__), *%w[.. lib god])
14 abort "=> You need the Mocha gem to run these tests."
21 class AbortCalledError < StandardError
26 raise AbortCalledError.new("abort called")
30 raise AbortCalledError.new("abort called")
35 class FakeCondition < Condition
41 class FakePollCondition < PollCondition
47 class FakeEventCondition < EventCondition
55 class FakeBehavior < Behavior
61 old_verbose, $VERBOSE = $VERBOSE, nil
64 $VERBOSE = old_verbose
67 # This allows you to be a good OOP citizen and honor encapsulation, but
68 # still make calls to private methods (for testing) by doing
70 # obj.bypass.private_thingie(arg1, arg2)
72 # Which is easier on the eye than
74 # obj.send(:private_thingie, arg1, arg2)
78 instance_methods.each do |m|
79 undef_method m unless m =~ /^__/
86 def method_missing(sym, *args)
87 @ref.__send__(sym, *args)