diff --git a/spec/controllers/api/taxonomies_controller_spec.rb b/spec/controllers/api/taxonomies_controller_spec.rb index 97f58d6324..6156cc0e78 100644 --- a/spec/controllers/api/taxonomies_controller_spec.rb +++ b/spec/controllers/api/taxonomies_controller_spec.rb @@ -23,9 +23,9 @@ module Api it "gets the jstree-friendly version of a taxonomy" do api_get :jstree, id: taxonomy.id - json_response["data"].should eq(taxonomy.root.name) - json_response["attr"].should eq("id" => taxonomy.root.id, "name" => taxonomy.root.name) - json_response["state"].should eq("closed") + expect(json_response["data"]).to eq(taxonomy.root.name) + expect(json_response["attr"]).to eq("id" => taxonomy.root.id, "name" => taxonomy.root.name) + expect(json_response["state"]).to eq("closed") end end end diff --git a/spec/controllers/api/taxons_controller_spec.rb b/spec/controllers/api/taxons_controller_spec.rb index 692c272279..94b32ab6d7 100644 --- a/spec/controllers/api/taxons_controller_spec.rb +++ b/spec/controllers/api/taxons_controller_spec.rb @@ -44,9 +44,9 @@ describe Api::TaxonsController do api_get :jstree, taxonomy_id: taxonomy.id, id: taxon.id response = json_response.first - response["data"].should eq(taxon2.name) - response["attr"].should eq("name" => taxon2.name, "id" => taxon2.id) - response["state"].should eq("closed") + expect(response["data"]).to eq(taxon2.name) + expect(response["attr"]).to eq("name" => taxon2.name, "id" => taxon2.id) + expect(response["state"]).to eq("closed") end it "cannot create a new taxon if not an admin" do diff --git a/spec/models/enterprise_spec.rb b/spec/models/enterprise_spec.rb index 52fa07bf45..9d5c7a0879 100644 --- a/spec/models/enterprise_spec.rb +++ b/spec/models/enterprise_spec.rb @@ -494,11 +494,11 @@ describe Enterprise do end it "gets all taxons of all distributed products in open order cycles" do - Spree::Product.stub(:in_distributor).and_return [product1, product2, product3] + allow(Spree::Product).to receive(:in_distributor).and_return [product1, product2, product3] ex.variants << product1.variants.first ex.variants << product3.variants.first - distributor.current_distributed_taxons.should match_array [taxon1, taxon3] + expect(distributor.current_distributed_taxons).to match_array [taxon1, taxon3] end it "gets all taxons of all supplied products" do