Skip to content

Commit

Permalink
Define rspec matcher only when rspec is defined (#529)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Welther <[email protected]>
  • Loading branch information
swelther and Sebastian Welther authored Feb 28, 2022
1 parent 742951c commit fb494c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/paranoia/rspec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if Rails.env.test?
if defined?(RSpec)
require 'rspec/expectations'

# Validate the subject's class did call "acts_as_paranoid"
Expand All @@ -23,4 +23,4 @@
end
end

end
end

0 comments on commit fb494c8

Please sign in to comment.