Closed vfonic closed 6 years ago
Seems like class reloading in Spring might unload the matchers - I'll have a look later this week
This is due to classes being redefined by Spring - currently this library does not accommodate for reloaded classes. A fix might be to load the matchers into the test library config (RSpec), which you could try with something along the lines of:
Rspec.configure do |config|
config.include(Shoulda::Callback::Matchers::ActiveModel)
end
This could be done in the library itself as well, although the inclusion into test libraries would have to be reworked for that. Help is very welcome.
Thanks @beatrichartz !
I've got it working by including the matchers in RSpec.config
as you suggested. I've also created a PR with this information added to Readme.md
as I believe Spring is widely used: https://github.com/beatrichartz/shoulda-callback-matchers/pull/19
Hi,
Thanks for great gem!
I've been having troubles using this gem locally as, together with spring gem (
spring rspec
or justrspec
), I get errors, while without it (bundle exec rspec
), it works as expected.Here's the error message I'm getting:
It looks like as if the gem is not loaded at all.
Gemfile:
Gemfile.lock: