jsonapi-rb / jsonapi-rspec

RSpec matchers for JSON:API spec
https://rubygems.org/gems/jsonapi-rspec
MIT License
123 stars 24 forks source link

Fix "undefined method `configure` bug #21

Closed sa73917 closed 4 years ago

sa73917 commented 4 years ago

Due to rake eagerly loading the jsonapi-rspec gem before the RSpec:Core module, configure isn't available when rspec.rb tries to use it. Requiring rspec/core resolves this issue.

What is the current behavior?

rake is failing with:

NoMethodError: undefined method `configure' for RSpec:Module
.../config/application.rb:20:in `<top (required)>'
.../Rakefile:4:in `require_relative'
.../Rakefile:4:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- jsonapi-rspec
.../config/application.rb:20:in `<top (required)>'
.../Rakefile:4:in `require_relative'
.../Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

What is the new behavior?

rake works as expected

Checklist

Please make sure the following requirements are complete:

stas commented 4 years ago

@sa73917 let's add rspec-core to the dependencies list and get this merged! :upside_down_face:

sa73917 commented 4 years ago

@stas - good point :) - all done...