class Shoulda::Matchers::ActiveRecord::AssociationMatchers::RequiredMatcher
def build_missing_option
def build_missing_option String.new('and for the record ').tap do |missing_option_string| missing_option_string << if required 'to ' else 'not to ' end missing_option_string << ( 'fail validation if '\ ":#{attribute_name} is unset; i.e., either the association "\ 'should have been defined with `required: '\ "#{required.inspect}`, or there " ) missing_option_string << if required 'should ' else 'should not ' end missing_option_string << "be a presence validation on :#{attribute_name}" end end