Skip to content

Commit

Permalink
fix lints in lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Mar 16, 2022
1 parent 4605dce commit 0c395e0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/testthat/test-settings.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ test_that("it errors if the config file does not end in a newline", {
expect_error(read_settings("foo"), "Malformed config file")
})

test_that("with_defaults works as expected", {
# test capturing unnamed args
defaults <- with_defaults(assignment_linter)
test_that("with_defaults works as expected with unnamed args", {
# assignment_linter is in defaults, so output doesn't change
expect_equal(names(defaults), names(with_defaults()))
expect_named(with_defaults(assignment_linter), names(with_defaults()))
})

test_that("rot utility works as intended", {
Expand Down Expand Up @@ -106,8 +104,8 @@ test_that("logical_env utility works as intended", {

# fixing #774
test_that("with_defaults doesn't break on very long input", {
expect_equal(
names(with_defaults(
expect_named(
with_defaults(
default = list(),
lintr::undesirable_function_linter(c(
detach = paste(
Expand All @@ -120,7 +118,7 @@ test_that("with_defaults doesn't break on very long input", {
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
)
))
)),
),
"lintr::undesirable_function_linter"
)
})
Expand Down

0 comments on commit 0c395e0

Please sign in to comment.