-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 1074 to improve code coverage of
R/utils.R
to 100% (#1075)
* feature: improve is_exisiting_module() - make it self-check if is called inside an R package (by checking for existence of an R-directory) - improve docs: add information that it checks for the existence of a module /!\ file /!\ name which is not the same as a module - improve tests: - proper cleanup of a golem - check failure/error if not inside a R-package (in the above sense) * tests: test create_if_need() function non-interactively - must produce error when called non-interactively for argyment type="file" * refactor: add clearer logic for create_if_needed() and test interactively 'no' - allow mocking of user interaction with "no"-response for testing purposes - requires encapsulation of yesno() to a separate function - restyle the file with grkstyler - add a test that mimicks user interation with "no" response of the yesno()-function => improve test coverage to 60.09 % * tests: add test for user interactive behavior "yes" whereby improving coverage to 62.62 % * refactor: - shallow-test encapsulated function ask_golem_creation_file() - remove redundant check_file_exist() which is never used inside `{golem}`! - improve formatting of some comments inside create_if_needed() => improve test coverage to 67.79% * tests: increaset R/utils.R coverage to 88.98% - snapshot tests save the output of cli-messages and check options - if cli:: package changes we see a different output and the snapshots will inform about this - additionally check do_if_unquiet() feature of these message functions
- Loading branch information
Showing
3 changed files
with
286 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# simple cat-messaging functions keep output style when printing | ||
|
||
> Rebuild Berlin from scratch. | ||
|
||
--- | ||
|
||
|
||
|
||
--- | ||
|
||
|
||
|
||
--- | ||
|
||
|
||
Initiating file download | ||
|
||
--- | ||
|
||
|
||
Copying file | ||
|
||
--- | ||
|
||
|
||
|
||
--- | ||
|
||
|
||
|
Oops, something went wrong.