Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spy API hangs when expected method is never invoked #33

Open
thedeeno opened this issue May 19, 2010 · 1 comment
Open

Spy API hangs when expected method is never invoked #33

thedeeno opened this issue May 19, 2010 · 1 comment
Labels
Milestone

Comments

@thedeeno
Copy link

I'm to new to this framework to figure this out myself just yet, but for some reason the spy api hangs when the target method is never invoked. Fortunately rspec times this out when running the 'spec' command correctly, but when using 'script/spec' in rails it hangs indefinitely - making the spy api unusable.

The following is the failing spec I added to spy_spec.rb (see pull request)

it "should raise error when method isn't invoked" do
  subject = Object.new

  def subject.something
  end

  spy(subject)

  lambda do
    received(subject).something.call
  end.should raise_error(RR::Errors::SpyVerificationErrors::SpyVerificationError) 
end

Any thoughts?

@mcmire
Copy link
Collaborator

mcmire commented Mar 8, 2013

I am also getting this with the latest version of RR and with my fork, so this is still a valid issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants