1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/spec/support/shoulda_matchers.rb

26 lines
645 B
Ruby

# frozen_string_literal: true
Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.test_framework :rspec
with.library :rails
end
end
module Shoulda
module Matchers
module ActiveModel
class ValidatePresenceOfMatcher < ValidationMatcher
def secure_password_being_validated?
return false unless defined?(
::ActiveModel::SecurePassword::InstanceMethodsOnActivation
)
@attribute == :password && @subject.class.ancestors.include?(
::ActiveModel::SecurePassword::InstanceMethodsOnActivation,
)
end
end
end
end
end