Fix failing spec on CI environments

This commit is contained in:
Angel Perez
2018-03-09 10:37:32 -04:00
parent ea21fe859b
commit 2d819c0b11

View File

@@ -5,7 +5,7 @@ require 'rails_helper'
describe 'Customization Engine' do describe 'Customization Engine' do
let(:test_key) { I18n.t('account.show.change_credentials_link') } let(:test_key) { I18n.t('account.show.change_credentials_link') }
let!(:default_path) { I18n.load_path } let!(:default_path) { I18n.load_path }
before do before do
@@ -16,15 +16,15 @@ describe 'Customization Engine' do
reset_load_path_and_reload(default_path) reset_load_path_and_reload(default_path)
end end
it "loads custom and override original locales" do it 'loads custom and override original locales' do
increase_load_path_and_reload(Dir[Rails.root.join('spec', 'support', increase_load_path_and_reload(Dir[Rails.root.join('spec', 'support',
'locales', 'custom', '*.{rb,yml}')]) 'locales', 'custom', '*.{rb,yml}')])
expect(test_key).to eq 'Overriden string with custom locales' expect(test_key).to eq 'Overriden string with custom locales'
end end
it "does not override original locales" do it 'does not override original locales' do
increase_load_path_and_reload(Dir[Rails.root.join('spec', 'support', increase_load_path_and_reload(Dir[Rails.root.join('spec', 'support',
'locales', '**', '*.{rb,yml}')]) 'locales', '*.{rb,yml}')])
expect(test_key).to eq 'Not overriden string with custom locales' expect(test_key).to eq 'Not overriden string with custom locales'
end end