mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2025-11-22 20:27:45 -05:00
Custom assertion for a success of CommandResult
This commit is contained in:
@@ -128,6 +128,15 @@ class IntegrationTest < Test::Unit::TestCase
|
||||
TestLib.clear_env
|
||||
end
|
||||
|
||||
# extra assertions
|
||||
|
||||
def assert_success(res)
|
||||
msg = build_message(nil, "command status was expected to be a success, but failed with code <?> and STDERR:\n\n#{res.err}", res.status.to_i)
|
||||
assert_block(msg) { res.status.success? }
|
||||
end
|
||||
|
||||
# utils
|
||||
|
||||
def make_project(template_dir = nil)
|
||||
test_name = local_name
|
||||
test_name = test_name[5..] if test_name.start_with?('test_')
|
||||
|
||||
Reference in New Issue
Block a user