Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Oct 21, 2024
1 parent 413963c commit daac362
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
1 change: 0 additions & 1 deletion R/upkeep.R
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ has_old_cran_comments <- function() {

last_upkeep_date <- function() {
as.Date(proj_desc()$get_field("Config/usethis/upkeep", "2000-01-01"), format = "%Y-%m-%d")
as.integer(proj_desc()$get_field("Config/usethis/upkeep", 2000L))
}

last_upkeep_year <- function() {
Expand Down
47 changes: 0 additions & 47 deletions tests/testthat/_snaps/upkeep.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,50 +60,3 @@
<sup>Created on 2023-01-01 with `usethis::use_tidy_upkeep_issue()`, using [usethis v1.1.0](https://usethis.r-lib.org)</sup>

# upkeep bullets don't change accidentally

Code
writeLines(upkeep_checklist())
Output
* [ ] `usethis::use_readme_rmd()`
* [ ] `usethis::use_github_links()`
* [ ] `usethis::use_pkgdown_github_pages()`
* [ ] `usethis::use_tidy_description()`
* [ ] `usethis::use_package_doc()`
Consider letting usethis manage your `@importFrom` directives here. `usethis::use_import_from()` is handy for this.
* [ ] `usethis::use_testthat()`. Learn more about testing at <https://r-pkgs.org/tests.html>
* [ ] Align the names of `R/` files and `test/` files for workflow happiness. The docs for `usethis::use_r()` include a helpful script. `usethis::rename_files()` may be be useful.
* [ ] `usethis::use_code_of_conduct()`
* [ ] Add alt-text to pictures, plots, etc; see <https://posit.co/blog/knitr-fig-alt/> for examples
Set up or update GitHub Actions. \
Updating workflows to the latest version will often fix troublesome actions:
* [ ] `usethis::use_github_action('check-standard')`
<sup>Created on 2023-01-01 with `usethis::use_upkeep_issue()`, using [usethis v1.1.0](https://usethis.r-lib.org)</sup>

---

Code
writeLines(checklist)
Output
* [ ] `usethis::use_readme_rmd()`
* [ ] `usethis::use_github_links()`
* [ ] `usethis::use_pkgdown_github_pages()`
* [ ] `usethis::use_tidy_description()`
* [ ] `usethis::use_package_doc()`
Consider letting usethis manage your `@importFrom` directives here. `usethis::use_import_from()` is handy for this.
* [ ] `usethis::use_testthat(3)` and upgrade to 3e, [testthat 3e vignette](https://testthat.r-lib.org/articles/third-edition.html)
* [ ] Align the names of `R/` files and `test/` files for workflow happiness. The docs for `usethis::use_r()` include a helpful script. `usethis::rename_files()` may be be useful.
* [ ] Consider changing default branch from `master` to `main`
* [ ] Remove description of test environments from `cran-comments.md`.
See `usethis::use_cran_comments()`.
* [ ] Add alt-text to pictures, plots, etc; see <https://posit.co/blog/knitr-fig-alt/> for examples
Set up or update GitHub Actions. \
Updating workflows to the latest version will often fix troublesome actions:
* [ ] `usethis::use_github_action('check-standard')`
* [ ] `usethis::use_github_action('test-coverage')`
<sup>Created on 2023-01-01 with `usethis::use_upkeep_issue()`, using [usethis v1.1.0](https://usethis.r-lib.org)</sup>

2 changes: 1 addition & 1 deletion tests/testthat/test-upkeep.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ test_that("tidy upkeep bullets don't change accidentally", {
create_local_package()
use_mit_license()
expect_equal(last_upkeep_year(), 2000L)
record_upkeep_year(2022L)
record_upkeep_date(as.Date("2022-04-04"))
expect_equal(last_upkeep_year(), 2022L)

local_mocked_bindings(
Expand Down

0 comments on commit daac362

Please sign in to comment.