-
Notifications
You must be signed in to change notification settings - Fork 43
Migrating from v1.1.1
Migrating from jasonkarns/bats-assert (ie, v1.1.1)
Replace with fail
(from bats-support).
No change; compatible with: assert
. π
No change; compatible with: refute
. π
If invoked without args, no change; compatible with: assert_success
. π
If invoked with optional $output
comparison argument, replace assert_success "foo"
with: assert_success; assert_output "foo"
.
(The old assert_success
helper, if provided an optional argument, would assert $status == 0
and that $output
equaled the optional argument. The new helper only asserts on the status code. Asserting on output must be done separately with assert_output
.)
If invoked without args, no change; compatible with: assert_failure
. π
If invoked with optional $output
comparison argument, replace assert_failure "foo"
with: assert_failure; assert_output "foo"
.
(The old assert_failure
helper, if provided an optional argument, would assert $status != 0
and that $output
equaled the optional argument. The new helper only asserts on the status code. Asserting on output must be done separately with assert_output
.)
No change; compatible with: assert_equal
. π
If used to assert against $output
, replace assert_contains "$output" foo
with assert_output --partial foo
.
If used to assert against an arbitrary value, there is no replacement. π
If used to assert against $output
, replace refute_contains "$output" foo
with refute_output --partial foo
.
If used to assert against an arbitrary value, there is no replacement. π
If used to assert against $output
, replace assert_starts_with "$output" "foo"
with `assert_output --regexp '^foo'.
If used to assert against an arbitrary value, there is no replacement. π
No change; compatible with: assert_output
. π
Replace with assert_output --partial foo
.
Replace with refute_output --partial foo
.
If merely checking for line existence (no line number argument), no change; compatible with: assert_line
. π
If asserting against a particular line number with the optional line number argument, replace: assert_line N foo
with assert_line --index N foo
.
If merely checking for line existence (no line number argument), no change; compatible with: refute_line
. π
If asserting against a particular line number with the optional line number argument, replace: refute_line N foo
with refute_line --index N foo
.