spec/features/admin/locale_spec.rb in solidus_backend-1.2.3 vs spec/features/admin/locale_spec.rb in solidus_backend-1.3.0.beta1
- old
+ new
@@ -1,27 +1,29 @@
require 'spec_helper'
-describe "setting locale", :type => :feature do
+describe "setting locale", type: :feature do
stub_authorization!
before do
+ ActionView::Base.raise_on_missing_translations = false
I18n.locale = I18n.default_locale
I18n.backend.store_translations(:fr,
- :date => {
- :month_names => [],
+ date: {
+ month_names: []
},
- :spree => {
- :admin => {
- :tab => { :orders => "Ordres" }
+ spree: {
+ admin: {
+ tab: { orders: "Ordres" }
},
- :listing_orders => "Ordres",
+ listing_orders: "Ordres"
})
Spree::Backend::Config[:locale] = "fr"
end
after do
I18n.locale = I18n.default_locale
Spree::Backend::Config[:locale] = "en"
+ ActionView::Base.raise_on_missing_translations = true
end
it "should be in french" do
visit spree.admin_path
expect(page).to have_content("Ordres")