diff --git a/spec/lib/spree/i18n_spec.rb b/spec/lib/spree/i18n_spec.rb index b79a5e705f..386dd9d2ec 100644 --- a/spec/lib/spree/i18n_spec.rb +++ b/spec/lib/spree/i18n_spec.rb @@ -24,15 +24,15 @@ describe "i18n" do end it "translates within the spree scope" do - Spree.normal_t(:foo).should eql("bar") - Spree.translate(:foo).should eql("bar") + expect(Spree.normal_t(:foo)).to eql("bar") + expect(Spree.translate(:foo)).to eql("bar") end it "translates within the spree scope using a path" do - Spree.stub(:virtual_path).and_return('bar') + allow(Spree).to receive(:virtual_path).and_return('bar') - Spree.normal_t('.legacy_translation').should eql("back in the day...") - Spree.translate('.legacy_translation').should eql("back in the day...") + expect(Spree.normal_t('.legacy_translation')).to eql("back in the day...") + expect(Spree.translate('.legacy_translation')).to eql("back in the day...") end it "raise error without any context when using a path" do @@ -46,19 +46,19 @@ describe "i18n" do end it "prepends a string scope" do - Spree.normal_t(:foo, scope: "bar").should eql("bar within bar scope") + expect(Spree.normal_t(:foo, scope: "bar")).to eql("bar within bar scope") end it "prepends to an array scope" do - Spree.normal_t(:foo, scope: ["bar"]).should eql("bar within bar scope") + expect(Spree.normal_t(:foo, scope: ["bar"])).to eql("bar within bar scope") end it "returns two translations" do - Spree.normal_t([:foo, 'bar.foo']).should eql(["bar", "bar within bar scope"]) + expect(Spree.normal_t([:foo, 'bar.foo'])).to eql(["bar", "bar within bar scope"]) end it "returns reasonable string for missing translations" do - Spree.t(:missing_entry).should include("