-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize server_variable_list() to variables()
Closes #30. This is the only place that variables() appears in the definition, and there's really no reason that it would have to be server-specific anyway.
- Loading branch information
1 parent
ce364a8
commit 3eb2c12
Showing
11 changed files
with
74 additions
and
74 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 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,35 @@ | ||
test_that("variables() errors informatively for bad contents", { | ||
expect_snapshot( | ||
variables(letters), | ||
error = TRUE | ||
) | ||
expect_snapshot( | ||
variables(list(letters, letters)), | ||
error = TRUE | ||
) | ||
expect_snapshot( | ||
variables( | ||
server_variable(), | ||
letters, | ||
server_variable(), | ||
letters | ||
), | ||
error = TRUE | ||
) | ||
}) | ||
|
||
test_that("variables() returns an empty variables", { | ||
expect_snapshot(variables()) | ||
}) | ||
|
||
test_that("variables() accepts bare server_variables", { | ||
expect_snapshot(variables(server_variable())) | ||
expect_snapshot(variables(server_variable(), server_variable())) | ||
}) | ||
|
||
test_that("variables() accepts lists of server_variables", { | ||
expect_snapshot(variables(list(server_variable()))) | ||
expect_snapshot( | ||
variables(list(server_variable(), server_variable())) | ||
) | ||
}) |
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