spec/features/locale_spec.rb in solidus_frontend-2.5.2 vs spec/features/locale_spec.rb in solidus_frontend-2.6.0.rc1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe 'setting locale', type: :feature do
let!(:store) { create(:store) }
def with_locale(locale)
@@ -10,16 +12,10 @@
I18n.locale = I18n.default_locale
Spree::Frontend::Config[:locale] = 'en'
end
context 'shopping cart link and page' do
- before do
- I18n.backend.store_translations(:fr,
- spree: {
- cart: 'Panier',
- shopping_cart: 'Panier'
- })
- end
+ include_context "fr locale"
it 'should be in french' do
with_locale('fr') do
visit spree.root_path
click_link 'Panier'