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 {}).should_not

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:

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.


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