-
Notifications
You must be signed in to change notification settings - Fork 0
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
Comments
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
spec_helper
has a blanket stub forSetting#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 onSetting
cannot be tested independently. It could also cause unexpected behavior for developers intending to testSetting
. We should refactor to remove this stub.The text was updated successfully, but these errors were encountered: