method

assert_contains_make_command

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: TestCase
assert_contains_make_command(target, output, msg = nil) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/test_case.rb, line 171
  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
Register or log in to add new notes.