spec/unit/command/update_spec.rb in chef-cli-3.0.40 vs spec/unit/command/update_spec.rb in chef-cli-3.1.0

- old
+ new

@@ -130,14 +130,10 @@ end context "when the command is successful" do before do expect(install_service).to receive(:run) - expect(ChefCLI::PolicyfileServices::UpdateAttributes).to receive(:new) - .with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, chef_config: anything) - .and_return(update_attrs_service) - expect(update_attrs_service).to receive(:run) end it "returns 0" do expect(command.run).to eq(0) end @@ -157,13 +153,9 @@ ChefCLI::PolicyfileInstallError.new("install failed", cause) end before do expect(install_service).to receive(:run).and_raise(exception) - expect(ChefCLI::PolicyfileServices::UpdateAttributes).to receive(:new) - .with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, chef_config: anything) - .and_return(update_attrs_service) - expect(update_attrs_service).to receive(:run) end it "returns 1" do expect(command.run).to eq(1) end