Skip to content

735 check module exists before adding new related files #779

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

Merged

Conversation

ALanguillaume
Copy link
Contributor

@ALanguillaume ALanguillaume commented Oct 29, 2021

Closes #735

add_fct(), add_utils() and use_module_test() are now all:

  • checking in a uniform way that the designated module already exist and if not throw the same error message.
  • tolerating that the user passes the module file name (mod_something.R) instead of the module name (something).

fct_, utils_, js and such extra files are optionally added only after module
main file has been created.
add_r_files() and use_module_test() will now both remove the "mod_" and
file extension if the module file name is passed as argument instead of
module name.
expect_true(file.exists("R/mod_ploup_utils_utils.R"))


remove_file(mod_ploup_file)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I am not sure I followed your testing routine properly. Especially when it comes to delete existing files.
We might need to talk about that.

@ColinFay ColinFay merged commit 148843d into dev Nov 5, 2021
@ColinFay ColinFay deleted the 735-check-module-exists-before-adding-new-related-files branch November 5, 2021 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When adding tests & fct/utils to module, check that the module exists
2 participants