Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

helper.exec() should be stubbed #70

Closed
florianb opened this issue Feb 11, 2016 · 4 comments
Closed

helper.exec() should be stubbed #70

florianb opened this issue Feb 11, 2016 · 4 comments
Assignees

Comments

@florianb
Copy link
Contributor

The helper.exec()-function should be stubbed or mocked to remove the test-dependency on a installed java-env.

Edit:
Stderr-outputs for Mac javac_1.8.0_74 are already provided in the fixture-directory.

@florianb florianb self-assigned this Feb 11, 2016
@Arcanemagus
Copy link
Member

Actually I'd say this is a rather bad idea. If the javac output itself changes on you, your tests will fail to show that anything is wrong (For example in linter-php I saw that PHP7 had fixed a bug in the output that I was unintentionally relying on to parse the output).

@florianb
Copy link
Contributor Author

Absolutely true - i stumbled over that, too. On the other hand i'd like to be able to test against formal stderr-outputs.

To get around that problem i would add a stderr-log per every issued compiler-version. I mean we rely on the formal javac output since this plugin exists and nothing changed there, yet. I consider the risk as being low.

Additionally i could add a test which does run the compiler checks for version and bug-formatting.

@florianb
Copy link
Contributor Author

Improve Specs

  • Add mocked helper.exec per possible java version (at least 6, 7, 8)
  • Add local base-spec to test the functionality of the package on the platform in use

@florianb
Copy link
Contributor Author

This issue is part of the refactoring: #76

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants