class Shoulda::ActiveRecord::Matchers::AllowMassAssignmentOfMatcher
def matches?(subject)
def matches?(subject) @subject = subject if attr_mass_assignable? if whitelisting? @failure_message = "#{@attribute} was made accessible" else if protected_attributes.empty? @failure_message = "no attributes were protected" else @failure_message = "#{class_name} is protecting " << "#{protected_attributes.to_a.to_sentence}, " << "but not #{@attribute}." end end true else if whitelisting? @negative_failure_message = "Expected #{@attribute} to be accessible" else @negative_failure_message = "Did not expect #{@attribute} to be protected" end false end end