From 8f4d600b47448014438f006e54c8f9cd0aaa1fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 23 Oct 2018 13:53:37 +0200 Subject: [PATCH] Fix spec assuming German isn't available Since we've recently added German to the available languages, and we might support every language in the future, we're using the fictional world language to check a locale which isn't available. Another option could be to set the available locales in the test environment (or the rspec helper), but then we'd have to make sure it's executed before the call to `globalize_accessors` in the model, and it might be confusing for developers. --- spec/models/i18n_content_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/i18n_content_spec.rb b/spec/models/i18n_content_spec.rb index edf57aec6..17eaefe8f 100644 --- a/spec/models/i18n_content_spec.rb +++ b/spec/models/i18n_content_spec.rb @@ -55,7 +55,7 @@ RSpec.describe I18nContent, type: :model do it 'responds to locales defined on model' do expect(i18n_content).to respond_to(:value_en) expect(i18n_content).to respond_to(:value_es) - expect(i18n_content).not_to respond_to(:value_de) + expect(i18n_content).not_to respond_to(:value_wl) end it 'returns nil if translations are not available' do