spec/base_crm/deal_spec.rb in basecrm-0.0.3 vs spec/base_crm/deal_spec.rb in basecrm-0.1.0

- old
+ new

@@ -41,13 +41,13 @@ end describe "#source" do - let(:source) { mock } + let(:source) { double } let(:source_id) { 444 } - let(:scope) { mock } + let(:scope) { double } before do subject.source_id = source_id end @@ -85,13 +85,13 @@ end describe "#contact" do - let(:contact) { mock } - let(:entity_id) { mock } - let(:scope) { mock } + let(:contact) { double } + let(:entity_id) { double } + let(:scope) { double } before do subject.entity_id = entity_id end @@ -118,22 +118,22 @@ end end describe "#contacts" do - let(:scope) { mock } - let(:fetch_scope) { mock } + let(:scope) { double } + let(:fetch_scope) { double } it "passes the token and users fetch_for_deal" do subject.should_receive(:pass_headers).with(BaseCrm::Contact).and_return(scope) scope.should_receive(:fetch_for_deal).with(subject).and_return(fetch_scope) subject.contacts.should == fetch_scope end end describe "#forecasting" do - let(:scope) { mock } - let(:fetch_scope) { mock } + let(:scope) { double } + let(:fetch_scope) { double } it "passes the token and uses fetch_for_deal" do subject.should_receive(:pass_headers).with(BaseCrm::Forecasting).and_return(scope) scope.should_receive(:fetch_for_deal).with(subject).and_return(fetch_scope) subject.forecasting.should == fetch_scope