module Minitest::Docker::Commands::Assertions

Public Instance Methods

assert_output(matcher, output, msg = nil) click to toggle source
# File lib/minitest/docker/commands.rb, line 31
def assert_output(matcher, output, msg = nil)
  if matcher.is_a?(Regexp)
    assert_match matcher, output.first.join, msg
  else
    assert_equal matcher, output.first.join, msg
  end
end
assert_successful(output, msg = nil) click to toggle source
# File lib/minitest/docker/commands.rb, line 21
def assert_successful(output, msg = nil)
  msg = message(msg) { "Command exited (#{output.last}):\n#{output[0].join}\n#{output[1].join}" }
  assert_equal 0, output.last, msg
end
refute_successful(output, msg = nil) click to toggle source
# File lib/minitest/docker/commands.rb, line 26
def refute_successful(output, msg = nil)
  msg = message(msg) { "Command exited (#{output.last}):\n#{output[0].join}\n#{output[1].join}" }
  refute_equal 0, output.last, msg
end