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

(MAINT) Move all unit tests under spec/unit #190

Merged
merged 1 commit into from
Jul 25, 2017

Conversation

scotje
Copy link
Contributor

@scotje scotje commented Jul 24, 2017

This simplifies running unit tests with your own rspec invocation
without having to copy the pattern from the rake task.

@scotje
Copy link
Contributor Author

scotje commented Jul 24, 2017

Some of the renaming was also to comply with rubocop rules.

Copy link
Contributor

@austb austb left a comment

Choose a reason for hiding this comment

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

👍 interesting that rubocop seems to care about file paths in spec tests but not the path in code.

The comment comes from rubocop allowing us to put PDK::Test::Unit inside lib/pdk/tests/unit.rb here. We may want to rename that directory or module for consistency.

@scotje
Copy link
Contributor Author

scotje commented Jul 24, 2017

I think it wants them to match is the thing, but it also only complains about files once you touch them in a commit. :)

@scotje
Copy link
Contributor Author

scotje commented Jul 24, 2017

I'll leave this open so that BFS has a chance to weigh in.

@rodjek
Copy link
Contributor

rodjek commented Jul 25, 2017

👍 this and lib/pdk/validators => lib/pdk/validate, lib/pdk/generators => lib/pdk/generate has been bugging me for a while

@DavidS
Copy link
Contributor

DavidS commented Jul 25, 2017

👍

remove the relevant exclusions from https://github.com/puppetlabs/pdk/blob/master/.rubocop_todo.yml

This simplifies running unit tests with your own rspec invocation
without having to copy the pattern from the rake task.
@scotje
Copy link
Contributor Author

scotje commented Jul 25, 2017

I think I successfully updated the exclusions.

@scotje scotje merged commit 9d06c61 into puppetlabs:master Jul 25, 2017
@scotje scotje deleted the spec_unit branch July 25, 2017 17:25
@DavidS
Copy link
Contributor

DavidS commented Jul 26, 2017

Looks good to me!

@chelnak chelnak added the maintenance Internal maintenance work that shouldn't appear in the changelog label Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Internal maintenance work that shouldn't appear in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants