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

Improved settings and fixed tests #364

Merged
merged 7 commits into from Nov 7, 2017
Merged

Improved settings and fixed tests #364

merged 7 commits into from Nov 7, 2017

Conversation

elorest
Copy link
Member

@elorest elorest commented Nov 5, 2017

Description of the Change

Fixed Settings so that it is initialized. This allows it to be tested without previous tests effecting it's state randomly. Also conforms to best practices.

Benefits

Allows for better tests. A few of the settings tests had to be commented out because settings were being overwritten by previous tests. It also makes more sense to instantiate settings when server is started instead of having a preexisting pseudo singleton.

Possible Drawbacks

None.

Copy link
Contributor

@marksiemers marksiemers left a comment

Choose a reason for hiding this comment

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

lgtm.

I think overall, we can continue to make an effort to have better structure the tests (files and actual tests).

I ran into a similar issue where it was a challenge to effectively isolate tests.

If there are any before_each or after_each we should try to get rid of them. They are unscoped - it is before_each test in the entire test suite.

@@ -37,6 +36,7 @@ describe Amber do
end
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like this should be a test for Amber::Settings rather than Amber::Server.configure

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@eliasjpr eliasjpr left a comment

Choose a reason for hiding this comment

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

Approved after @marksiemers comment

@elorest elorest merged commit 8245639 into master Nov 7, 2017
@eliasjpr eliasjpr deleted the is/fix_settings branch November 8, 2017 00:34
elorest added a commit that referenced this pull request Nov 17, 2017
* Fixed session so that it could be tested without previous tests
effecting it's state randomly. Also conforms to best practices.

* resolved logging level settings with instance variables

* added settings to configure with block since it's probably clear than configure.

* added requested test change
elorest added a commit that referenced this pull request Nov 17, 2017
* Fixed session so that it could be tested without previous tests
effecting it's state randomly. Also conforms to best practices.

* resolved logging level settings with instance variables

* added settings to configure with block since it's probably clear than configure.

* added requested test change


Former-commit-id: 232ab29
@faustinoaq faustinoaq added this to Done in Framework 2018 May 5, 2018
@faustinoaq faustinoaq removed this from Done in Framework 2018 Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants