Non-pending spec returning pending

I’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 back in, the spec doesn’t pass.
Instead I get this:

Pending:
ActiveResourceFormHandlersInitializer initializing ARes all
nifty-style NO NAME (Not Yet Implemented)

It’s very very likely this is due to some bug in my code - programming
the sloppy way kind of has that effect - but I’m finding the output
somewhere between weird and incomprehensible. What’s going on? Is
RSpec doing some initialization as well, so that my initialization
monkey-patch screws with its head?


Giles B.

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs