-
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.
Merge pull request #209 from hl7au/71-add-message-for-skip
Add conditional/basic skip with message
- Loading branch information
Showing
6 changed files
with
55 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
module AUCoreTestKit | ||
module AssertHelpers | ||
extend Forwardable | ||
|
||
def_delegators 'properties', | ||
:conditional_skip_with_msg, | ||
:skip_with_msg | ||
|
||
def act_if_with_message(act_func, condition, message) | ||
info message if condition | ||
|
||
act_func.call(condition, message) | ||
end | ||
|
||
def act_with_message(act_func, message) | ||
info message | ||
|
||
act_func.call(message) | ||
end | ||
|
||
def conditional_skip_with_msg(condition, message) | ||
act_if_with_message(method(:skip_if), condition, message) | ||
end | ||
|
||
def skip_with_msg(message) | ||
act_with_message(method(:skip), message) | ||
end | ||
end | ||
end |
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
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