From 11d8bd6a3df66e7b30443669a1ea4f1df2903b46 Mon Sep 17 00:00:00 2001 From: taitus Date: Fri, 13 Sep 2019 11:45:46 +0200 Subject: [PATCH] Stub the response to an external request --- spec/shared/features/remotely_translatable.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/shared/features/remotely_translatable.rb b/spec/shared/features/remotely_translatable.rb index 74d850688..1babdab6c 100644 --- a/spec/shared/features/remotely_translatable.rb +++ b/spec/shared/features/remotely_translatable.rb @@ -10,6 +10,9 @@ shared_examples "remotely_translatable" do |factory_name, path_name, path_argume before do Setting["feature.remote_translations"] = true + available_locales_response = %w[de en es fr pt zh-Hans] + expect(RemoteTranslations::Microsoft::AvailableLocales).to receive(:available_locales).at_most(3).times. + and_return(available_locales_response) end context "Button to request remote translation" do