-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update onLoad (WIP) * Fix #453 * Rename * Add tests the second one is a mocking test * More tests * Update README c
- Loading branch information
1 parent
397ded5
commit 6d73e93
Showing
8 changed files
with
78 additions
and
18 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
test_that("uninstalled_formats()", { | ||
skip_on_cran() | ||
formats <- uninstalled_formats() | ||
if (is.null(formats)) { | ||
expect_true(install_formats()) | ||
} else { | ||
expect_type(formats, "character") | ||
} | ||
}) | ||
|
||
|
||
test_that("show_unsupported_formats (in the fully supported environment) on CI", { | ||
skip_on_cran() | ||
for (pkg in attr(rio_formats, "suggested_packages")) { | ||
skip_if_not_installed(pkg) | ||
} | ||
expect_false(show_unsupported_formats()) | ||
expect_message(show_unsupported_formats(), "All default") | ||
}) | ||
|
||
test_that("show_unsupported_formats (in the partial supported environment) on CI", { | ||
skip_on_cran() | ||
fake_uninstalled_formats <- function() { | ||
return(c("readODS")) | ||
} | ||
with_mocked_bindings(code = { | ||
expect_true(show_unsupported_formats()) | ||
expect_message(show_unsupported_formats(), "These formats are not supported") | ||
}, `uninstalled_formats` = fake_uninstalled_formats) | ||
}) |