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

Rspec 3.1 compatibility #7

Open
samanthamjohn opened this issue Dec 24, 2014 · 6 comments
Open

Rspec 3.1 compatibility #7

samanthamjohn opened this issue Dec 24, 2014 · 6 comments

Comments

@samanthamjohn
Copy link

Rspec 2 uses APIs that are deprecated in Rails 4.2. This is fixed in Rspec 3.1 but better_receive is tied to 2.1

@toothrot
Copy link

toothrot commented May 5, 2015

👍

@nertzy
Copy link

nertzy commented May 5, 2015

transpec might be helpful for this http://yujinakayama.me/transpec/

@se3000
Copy link
Owner

se3000 commented May 5, 2015

Thanks for the bump, kinda slipped past me. I'll get on this soon.

This functionality was supposed to be included in RSpec 3, I'm not sure how to turn it on though. You can definitely get full mocks, rspec-fire style, with the instance_double method... not sure about partial mocks.

If something like this is in RSpec 3, upgrading with transpec is definitely the smoothest option. Probably just requires a find-and-replace like s/better_receive/should_receive/ first.

@toothrot
Copy link

toothrot commented May 5, 2015

Holy crap. Didn't know about transpec. That's great!

@toothrot
Copy link

Thanks, @nertzy ! Huge help. Never heard about transpec before, and it is amazing.

I patched transpec to support converting better receive. The dynamic analysis isn't working yet, but the conversions seemed to work great. I hope to wrap it up and submit a pull request.

https://github.com/toothrot/transpec/tree/better-receive-support

@abepetrillo
Copy link

Just an FYI for others, was looking into using Rspec 3 with this, but in my case using verifying doubles was enough.

Repository owner deleted a comment from 12Chris12 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@nertzy @toothrot @samanthamjohn @se3000 @abepetrillo and others