class Gem::TestCase
def assert_contains_make_command(target, output, msg = nil)
def assert_contains_make_command(target, output, msg = nil) if output.match(/\n/) msg = message(msg) { 'Expected output containing make command "%s": %s' % [ ('%s %s' % [make_command, target]).rstrip, output.inspect ] } else msg = message(msg) { 'Expected make command "%s": %s' % [ ('%s %s' % [make_command, target]).rstrip, output.inspect ] } end assert scan_make_command_lines(output).any? { |line| make = parse_make_command_line(line) if make[:targets].include?(target) yield make, line if block_given? true else false end }, msg end