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

Reset globalize fallbacks before every test #3601

Merged
merged 1 commit into from
Jun 10, 2019
Merged

Conversation

javierm
Copy link
Member

@javierm javierm commented Jun 7, 2019

Background

When any helper, lib, mailer, model or view spec is executed after a feature, controller or request spec Globalize.fallbacks returns nil and this can cause some flaky specs. With this patch we are ensuring to initialize Globalize fallbacks between specs.

Objectives

  • Reset globalize fallbacks before every test, so previous tests don't affect the result of the current test

When any helper, lib, mailer, model or view spec is executed
after a feature, controller or request spec Globalize.fallbacks
returns nil and this can cause some flaky specs. With this
patch we are ensuring to initialize Globalize fallbacks
between specs.

Controller, feature and request specs do not need this patch
because of application_controller is currently initializing
Globalize.fallback on each request.
@javierm javierm self-assigned this Jun 7, 2019
@javierm javierm merged commit 28b3777 into master Jun 10, 2019
@javierm javierm deleted the fix_globalize_fallbacks branch June 10, 2019 13:59
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.

None yet

3 participants