Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix Failing Specs For Missing i18n-tasks Gem (#11404)

Matthew Kennedy82ede467d137
diff --git a/api/spec/spec_helper.rb b/api/spec/spec_helper.rb
index 22dbbbc5b3..d4d2cc1fd5 100644
--- a/api/spec/spec_helper.rb
+++ b/api/spec/spec_helper.rb
@@ -27,10 +27,8 @@ end
require 'rspec/rails'
require 'ffaker'
-
require 'i18n/tasks'
-
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each { |f| require f }
diff --git a/common_spree_dependencies.rb b/common_spree_dependencies.rb
index 39595f2541..db5b2b3edb 100644
--- a/common_spree_dependencies.rb
+++ b/common_spree_dependencies.rb
@@ -44,6 +44,7 @@ end
group :test, :development do
gem 'awesome_print'
gem 'gem-release'
+ gem 'i18n-tasks'
gem 'redis'
gem 'rubocop', '~> 1.0', require: false
gem 'rubocop-rspec', require: false
diff --git a/core/spec/lib/i18n_spec.rb b/core/spec/lib/i18n_spec.rb
index b114b49543..664d20223b 100644
--- a/core/spec/lib/i18n_spec.rb
+++ b/core/spec/lib/i18n_spec.rb
@@ -30,7 +30,7 @@ describe 'i18n' do
locales = Spree.available_locales
expected_locales = [:en, :de, :nl, :ar, :az, :bg, :ca, :cs, :da, :el, :es, :fa, :fi, :fr, :hu, :id, :it, :ja, :"pt-BR", :ro, :ru, :sk, :tr, :"zh-CN", :"zh-TW", :pl, :uk, :vi]
- expect(locales).to eq expected_locales
+ expect(locales).to match_array(expected_locales)
end
it 'returns an array with the string "en" removed' do
@@ -46,7 +46,7 @@ describe 'i18n' do
expected_locales = [:en, :ar, :az, :bg, :ca, :cs, :da, :de, :el, :es, :fa, :fi, :fr, :hu, :id, :it, :ja, :nl, :"pt-BR", :ro, :ru, :sk, :tr, :"zh-CN", :"zh-TW", :pl, :uk, :vi]
- expect(locales).to eq expected_locales
+ expect(locales).to match_array(expected_locales)
end
end
end