class Shoulda::ActiveRecord::Matchers::ValidateUniquenessOfMatcher
def set_scoped_attributes
def set_scoped_attributes unless @scopes.blank? @scopes.each do |scope| setter = :"#{scope}=" unless @subject.respond_to?(setter) @failure_message = "#{class_name} doesn't seem to have a #{scope} attribute." return false end @subject.send("#{scope}=", @existing.send(scope)) end end true end