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

Refactor testing and use data types in private classes #645

Merged
merged 3 commits into from
Oct 31, 2018

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Oct 26, 2018

With rspec-puppet you're not supposed to test individual classes that should be private. This also makes it more efficient because we had quite a few duplicated cases.

By enforcing $enabled a boolean we can use a simple if/else instead of a case statement. We can also use pick() to remove another case statement.

I'll also get to the server side but it might be easier to remove passenger support first.

With rspec-puppet you're not supposed to test individual classes that
should be private. This also makes it more efficient because we had
quite a few duplicated cases.
By enforcing it a boolean we can use a simple if/else instead of a case
statement. We can also use pick() to remove another case statement.
@mmoll mmoll merged commit d0458ce into theforeman:master Oct 31, 2018
@mmoll
Copy link
Contributor

mmoll commented Oct 31, 2018

merged, bedankt @ekohl!

@ekohl ekohl deleted the refactor-testing branch October 31, 2018 14:34
@ekohl ekohl changed the title Refactor testing and some puppet classes Refactor testing and use data types in private classes Dec 6, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants