avit / rspec-rails-caching

RSpec helpers for testing page and action caching in Rails
MIT License
12 stars 7 forks source link

Require rspec/core and use config.include Matchers to fix Rails env loading issue #2

Closed joemsak closed 10 years ago

joemsak commented 11 years ago

I had the exact same issue described at thoughtbot/shoulda-matchers#259

https://github.com/thoughtbot/shoulda-matchers/issues/259

petRUShka commented 11 years ago

same error on rake db:migrate

ScotterC commented 10 years ago

thanks!

avit commented 10 years ago

Not sure why I'm not seeing this issue myself. I'll see the related shoulda-matchers ticket and see if I can understand what's happening here. I wonder if it's a concern to include our Matchers everywhere instead of just in RSpec::Rails::ControllerExampleGroup where they belong?

avit commented 10 years ago

This gem relies on testing rails controllers; I think it should require loading rspec/rails and inject itself into its ControllerExampleGroup only. I'm going to close this for now, unless someone has more context for reproducing the problem.

(Note the updated usage requires you to set perform_caching = true globally in your test environment; this gem captures all cache events.)