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

Do not depend on rspec meta gem #222

Merged
merged 1 commit into from
Aug 17, 2018

Conversation

lucasmazza
Copy link
Contributor

The rspec gem is a shortcut to depend on rspec-core, rspec-expectations and rspec-mocks, but depending on it directly clashes with the rspec-rails gem that is also a bag of sub RSpec dependencies.

This helps with scenarios where one meta gem locks the update of another one, like in the following:

bundle update rspec-rails
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Bundler could not find compatible versions for gem "rspec-mocks":
  In Gemfile:
    mongoid-rspec was resolved to 4.0.1, which depends on
      rspec (~> 3.3) was resolved to 3.7.0, which depends on
        rspec-mocks (~> 3.7.0)

    rspec-rails (= 3.8.0) was resolved to 3.8.0, which depends on
      rspec-mocks (~> 3.8.0)

@mongoid-bot
Copy link

mongoid-bot commented Aug 16, 2018

1 Message
📖 We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!

Generated by 🚫 danger

@dblock
Copy link
Collaborator

dblock commented Aug 16, 2018

Seems reasonable if you can fix the build ;)

@lucasmazza lucasmazza force-pushed the rspec-meta-dependency branch from f61ab18 to 6f9766c Compare August 16, 2018 22:21
The `rspec` gem is a shortcut to depend on `rspec-core`,
`rspec-expectations` and `rspec-mocks`, but depending on it directly
clashes with the `rspec-rails` gem that is also a bag of sub RSpec
dependencies.

This helps with scenarios where one meta gem locks the update of another
one, like in the following:

```
bundle update rspec-rails
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Bundler could not find compatible versions for gem "rspec-mocks":
  In Gemfile:
    mongoid-rspec was resolved to 4.0.1, which depends on
      rspec (~> 3.3) was resolved to 3.7.0, which depends on
        rspec-mocks (~> 3.7.0)

    rspec-rails (= 3.8.0) was resolved to 3.8.0, which depends on
      rspec-mocks (~> 3.8.0)
```
@lucasmazza lucasmazza force-pushed the rspec-meta-dependency branch from 6f9766c to b7d730b Compare August 16, 2018 22:21
@lucasmazza
Copy link
Contributor Author

@dblock all green now :)

@dblock dblock merged commit 53eefb9 into mongoid:master Aug 17, 2018
@lucasmazza lucasmazza deleted the rspec-meta-dependency branch August 17, 2018 16:46
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

Successfully merging this pull request may close these issues.

3 participants