1 require File.join(File.dirname(__FILE__), *%w[.. lib god])
13 puts "=> You need the Mocha gem to run these tests."
21 class ExitCalledError < StandardError
26 raise ExitCalledError.new("exit called")
30 class FakeCondition < Condition
37 class FakeBehavior < Behavior
42 # This allows you to be a good OOP citizen and honor encapsulation, but
43 # still make calls to private methods (for testing) by doing
45 # obj.bypass.private_thingie(arg1, arg2)
47 # Which is easier on the eye than
49 # obj.send(:private_thingie, arg1, arg2)
53 instance_methods.each do |m|
54 undef_method m unless m =~ /^__/
61 def method_missing(sym, *args)
62 @ref.__send__(sym, *args)