-
Notifications
You must be signed in to change notification settings - Fork 14
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
Any way to make transition from vanilla RSpec easier? #30
Comments
Hi, I've copied a little bit of rspec-mocks api on top of bogus in this gist. Check if it covers your use cases. It is tested and uses only public api, however it is still a hack, so I would use it only during the transition phase. :) The |
We should probably consider making this mapping available as a part of Bogus. |
Maybe an optional The gist didn't seem to work, but I haven't had the time to track down why yet. Hopefully tomorrow. But thanks for your efforts, really appreciate it! |
What was the problem with the gist? I tested it on rspec 2.14.1 and bogus 0.1.3. |
@wrozka I agree with @marten and @psyho's suggestion. I think it would help adoption as people would be more confident that the compatibility layer is kept up to date with the Bogus code and that it has some sort of test coverage with out having to come here to find the Gist and find out which version it has been tested against. I know I have a large project that I would like to port over to Bogus eventually. Knowing I could trust the compatibility layer to stay in sync with Bogus while I make the transition would make me more confident in starting this. I'm sure it is volunteer work to keep it all up to date so I can understand not wanting to commit to that but I just wanted to give you a use case for having it in the Gem rather than in a separate Gist. Great work so far! |
If you add Bogus, you lose RSpec's
double
, and the syntax forstub
changes. Is there any way of incrementally adding Bogus to an existing codebase?We're on RSpec 2.14 with no deprecation warnings, so all our test doubles are instantiated with
double()
(stub/mock are deprecated), but we do have a bunch ofobject.stub(method: result)
. This means that (for us) Bogus'stub(object).method { result }
should not conflict as long as we can keepobject.stub
working as in rspec_mocks.The text was updated successfully, but these errors were encountered: