Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find tests or tests/testthat subdirectory #14

Closed
krlmlr opened this issue Jun 14, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@krlmlr
Copy link
Member

commented Jun 14, 2016

so that it works from Rstudio, testthat tests, and R CMD check.

I think this needs two changes:

  • A new criterion that checks the paths of the parent directory components, say, has_parent_dir()
  • Allowing to pass a vector to make_fix_root_file()

Usage would be:

find_test_file <- has_parent_dir("tests/testthat")$make_fix_file(c("tests/testthat", ""))

RE r-lib/testthat#425 (comment), CC @jennybc @richfitz.

@krlmlr krlmlr closed this in 76a18ae Oct 23, 2016

krlmlr added a commit that referenced this issue Oct 23, 2016

Merge tag 'v1.0-7'
- New `is_testthat` and `find_testthat_root_file()` that looks for `tests/testthat` root (#14).
- Improve navbar on project page.
- Uses `backports` to simplify compatibility with R 3.0.0.
- New `is_remake_project` and `find_remake_root_file()` that looks for remate project (#17).
@krlmlr

This comment has been minimized.

Copy link
Member Author

commented Oct 23, 2016

krlmlr added a commit that referenced this issue Nov 6, 2016

Merge tag 'v1.1'
- Compatibility
    - Compatible with R >= 3.0.0 with the help of the `backports` package.

- New root criteria
    - `is_remake_project` and `find_remake_root_file()` look for [remake](https://github.com/richfitz/remake) project (#17).
    - `is_testthat` and `find_testthat_root_file()` that looks for `tests/testthat` root (#14).
    - `from_wd`, useful for creating accessors to a known path (#11).

- Minor enhancement
    - Criteria can be combined with the `|` operator (#15).

- Documentation
    - Add package documentation with a few examples (#13).
    - Clarify difference between `find_file()` and `make_fix_file()` in vignette (#9).
    - Remove unexported functions from documentation and examples (#10).
    - Use `pkgdown` to create website.

- Testing
    - Use Travis instead of wercker. Travis tests three R versions, and OS X.
    - Improve AppVeyor testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.