spec/unit/application_spec.rb in ohai-14.2.0 vs spec/unit/application_spec.rb in ohai-14.3.0

- old
+ new

@@ -41,17 +41,17 @@ context "when specified on the command line" do let(:argv) { [ "-c", config_file ] } before(:each) do if windows? - expect(ChefConfig::WorkstationConfigLoader).to receive(:new). - with("C:#{config_file}", Ohai::Log). - and_return(config_loader) + expect(ChefConfig::WorkstationConfigLoader).to receive(:new) + .with("C:#{config_file}", Ohai::Log) + .and_return(config_loader) else - expect(ChefConfig::WorkstationConfigLoader).to receive(:new). - with(config_file, Ohai::Log). - and_return(config_loader) + expect(ChefConfig::WorkstationConfigLoader).to receive(:new) + .with(config_file, Ohai::Log) + .and_return(config_loader) end end it "loads the configuration file" do expect(config_loader).to receive(:load) @@ -67,13 +67,13 @@ end end context "when a local workstation config exists" do before(:each) do - expect(ChefConfig::WorkstationConfigLoader).to receive(:new). - with(nil, Ohai::Log). - and_return(config_loader) + expect(ChefConfig::WorkstationConfigLoader).to receive(:new) + .with(nil, Ohai::Log) + .and_return(config_loader) end it "loads the configuration file" do expect(config_loader).to receive(:load) app.configure_ohai @@ -84,11 +84,11 @@ context "when CLI options are provided" do let(:argv) { [ "-d", directory ] } let(:directory) { "/some/fantastic/plugins" } it "does not generate deprecated config warnings for cli options" do - expect(Ohai::Log).to_not receive(:warn). - with(/Ohai::Config\[:directory\] is deprecated/) + expect(Ohai::Log).to_not receive(:warn) + .with(/Ohai::Config\[:directory\] is deprecated/) app.configure_ohai end end end