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

Failed any_instance conversion #46

Closed
myronmarston opened this issue Feb 23, 2014 · 0 comments
Closed

Failed any_instance conversion #46

myronmarston opened this issue Feb 23, 2014 · 0 comments
Labels

Comments

@myronmarston
Copy link

I'm running transpec against rspec-mocks (as we still have a lot of specs written using the old stub and should_receive syntax). It converted this spec to:

      it 'works for instance methods defined on the class' do
        expect(klass.any_instance).to receive(:meth_1).and_call_original
        expect(klass.new.meth_1).to eq(:original)
      end

...but should have converted it to:

      it 'works for instance methods defined on the class' do
        expect_any_instance_of(klass).to receive(:meth_1).and_call_original
        expect(klass.new.meth_1).to eq(:original)
      end
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