Skip to content

Commit

Permalink
RUB-18 More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishp91 committed Oct 11, 2023
1 parent fc66fbd commit fd8755b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions spec/templates/cloud_provider/translator_api_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
RSpec.describe Rubyvernac::CloudProvider::TranslatorApi do

describe "#translate" do
it "delegate translate to cloud provider instance" do
translator = instance_double("Rubyvernac::CloudProvider::Gcp::GoogleTranslatorApi")
expect(translator).to receive(:translate).with("text_to_be_translated", "hi").
and_return("text_after_translation")
expect(translator).to receive(:translate).with("text_to_be_translated", "hi")
.and_return("text_after_translation")

translator_klass = class_double("Rubyvernac::CloudProvider::Gcp::GoogleTranslatorApi")
.as_stubbed_const(transfer_nested_constants: true)
Expand All @@ -15,5 +14,4 @@
expect(instance.translate("text_to_be_translated", "hi")).to eq("text_after_translation")
end
end

end

0 comments on commit fd8755b

Please sign in to comment.