From 74f29f8c74ad2d84baa7b3faa97dddb83b7a4f02 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Wed, 2 Jul 2014 16:36:37 +1000 Subject: [PATCH] Tweaking spec names --- spec/models/enterprise_caching_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/models/enterprise_caching_spec.rb b/spec/models/enterprise_caching_spec.rb index af05897a6e..51ed68aace 100644 --- a/spec/models/enterprise_caching_spec.rb +++ b/spec/models/enterprise_caching_spec.rb @@ -6,19 +6,19 @@ describe Enterprise do let(:enterprise) { create(:distributor_enterprise, updated_at: 1.week.ago) } let(:taxon) { create(:taxon) } - describe "with supplied taxon" do + describe "with a supplied product" do let(:product) { create(:simple_product, supplier: enterprise) } let!(:classification) { create(:classification, taxon: taxon, product: product) } - it "supplied taxon is updated" do + it "touches enterprise when a classification on that product changes" do expect{classification.save!}.to change{enterprise.updated_at} end end - describe "with distributed taxon" do + describe "with a distributed product" do let(:product) { create(:simple_product) } let!(:oc) { create(:simple_order_cycle, distributors: [enterprise], variants: [product.master]) } let!(:classification) { create(:classification, taxon: taxon, product: product) } - it "distributed taxon is updated" do + it "touches enterprise when a classification on that product changes" do expect{classification.save!}.to change{enterprise.reload.updated_at} end end @@ -26,7 +26,7 @@ describe Enterprise do describe "with relatives" do let(:child_enterprise) { create(:supplier_enterprise) } let!(:er) { create(:enterprise_relationship, parent: enterprise, child: child_enterprise) } - it "enterprise relationship is updated" do + it "touches enterprise when enterprise relationship is updated" do expect{er.save!}.to change {enterprise.reload.updated_at } end end @@ -36,13 +36,13 @@ describe Enterprise do before do enterprise.shipping_methods << sm end - it "distributor_shipping_method is updated" do + it "touches enterprise when distributor_shipping_method is updated" do expect { enterprise.distributor_shipping_methods.first.save! }.to change {enterprise.reload.updated_at} end - it "shipping method is updated" do + it "touches enterprise when shipping method is updated" do expect{sm.save!}.to change {enterprise.reload.updated_at } end end