I'm trying to stub the method "test" on an object, and I cannot do it with
rspec.
Example with a simpler case:
o = Object.new
o.stub!(:test).and_return "lol"
o.test.should == "lol"
Error:
Failure/Error: o.test.should == "lol"
NoMethodError: private method `test' called for #<Object:0x13cf47e4>
This is probably because Kernel implements #test and stubs are done with
method_missing.
What's the recommended way to deal this this?
--
Un fleac... m-au ciuruit.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users