Displaying 1 result from an estimated 1 matches for "the_new_method".
Did you mean:
dh_new_method
2008 Feb 01
0
non-pending spec returning pending
...;m speccing some code which monkey-patches initialize on
ActiveResource::Base. The monkey-patch lives in a module. My spec
looks like this:
describe MyModule, "doing stuff" do
it "adds methods to ARes subclasses" do
class Thing < ARes::Base ; end
(lambda {Thing.new.the_new_method}).should_not raise_error(NoMethodError)
end
end
I did this thing backwards, all sloppy hack style, and I''ve got code
which uses alias_method_chain to introduce the method-adding during
initializiation. If I comment out that call to alias_method_chain, the
spec fails. But if I comment it...