# File lib/shoulda/assertions.rb, line 48 48: def assert_accepts(matcher, target, options = {}) 49: if matcher.respond_to?(:in_context) 50: matcher.in_context(self) 51: end 52: 53: if matcher.matches?(target) 54: assert_block { true } 55: if options[:message] 56: assert_match options[:message], matcher.negative_failure_message 57: end 58: else 59: assert_block(matcher.failure_message) { false } 60: end 61: end