method
assert_contains_make_command
v2_6_3 -
Show latest stable
- Class:
Gem::TestCase
assert_contains_make_command(target, output, msg = nil)public
No documentation available.
# File lib/rubygems/test_case.rb, line 192
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