Closed lionelchauvin closed 2 years ago
It could be replaced by:
if !(defined? Rails) || Rails.env.test?
or
if ENV['RAILS_ENV'] == 'test'
or don't require 'paranoia/rspec' and let developpers do it.
this is merged in core
but still not tagged release
https://github.com/rubysherpas/paranoia/pull/529
https://github.com/rubysherpas/paranoia/commit/35721293fe5bad93f31708237dd27cffd4c90a28#diff-a7b13874ca65cce80cfa49aa594d2cbb4a486019b334c831ce0bd5de605f2533R1
This commit checks if Rails.env.test? in order to add rspec matchers but rails is not a dependency of paranoia. Gems that are only dependent on activerecord (and paranoia) crash on this line.