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

Remove aggressive Setting#cache_backend stub #38

Open
no-reply opened this issue Feb 1, 2017 · 0 comments
Open

Remove aggressive Setting#cache_backend stub #38

no-reply opened this issue Feb 1, 2017 · 0 comments

Comments

@no-reply
Copy link
Member

no-reply commented Feb 1, 2017

spec_helper has a blanket stub for Setting#cache_backend.

When running an individual test file, this causes a failure if Setting hasn't already been loaded; so files that don't depend on Setting cannot be tested independently. It could also cause unexpected behavior for developers intending to test Setting. We should refactor to remove this stub.

no-reply pushed a commit that referenced this issue Feb 1, 2017
Adds a generic Guardfile.

`spec_helper.rb` includes a stub on `Setting` in a before(:each), which
prevents various spec files from running without the rest of the
suite. This pattern also has the issue that it stubs
`Setting#cache_backend` without warning to developers, giving unexpected
results. We should find a way to remove it. See #38.

In the meanwhile, we introduce a guard to prevent errors, and allow
modules that don't depend on `Setting` to be tested independently.
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

No branches or pull requests

1 participant