stack level too deep when stub method via any_instance in base class #152

Closed
piotrze opened this Issue Jun 15, 2012 · 3 comments

Comments

Projects
None yet
5 participants

piotrze commented Jun 15, 2012

There is a bug when you stub some method in base class via any_instance, and You want to call that method in child class.

it "should stub method in base class" do
  Class A < Object
  end
  Object.any_instance.stub(:some_method).and_return("foo")
  a = A.new
  a.foo
end
Owner

dchelimsky commented Jun 15, 2012

@kaiwren one more for you or your crew if you want it.

Contributor

kaiwren commented Jun 16, 2012

Sure, no problem.

geemus commented Jun 18, 2012

I am also running into a stack level too deep in heroku/heroku which seems likely to be this same thing. It doesn't always happen, fwiw, just with certain seeds when the run is randomized. You can see some of these on travis if it is helpful: http://travis-ci.org/#!/heroku/heroku

daneget referenced this issue Aug 2, 2012

Closed

Issue 152 fix #169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment