-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the first working version, will only support ordered successive calls, upcoming change should have param-base action triggers
- Loading branch information
Showing
5 changed files
with
63 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
test_fails_if_given_arguments_isnt_right() { | ||
mock some-command --with-args "one two three" | ||
|
||
some-command three two one > assertion_output | ||
assert ${?} failed | ||
|
||
expected_error=$(cat <<-EXP | ||
Unexpected invocation for command 'some-command': | ||
Got : <"three two one"> | ||
Expected : <"one two three"> | ||
EXP | ||
) | ||
assert "$(cat assertion_output)" equals "${expected_error}" | ||
} | ||
|
||
test_fails_if_2_with_args_argments_are_given() { | ||
mock some-command --with-args "a" --with-args "b" > error | ||
assert ${?} failed | ||
|
||
assert "$(cat error)" equals "Cannot expect more than 1 set of argument for an invocation, please use 'mock' multiple times" | ||
} |
File renamed without changes.