diff options
author | adamedx <adamedx@gmail.com> | 2016-02-15 07:48:47 -0800 |
---|---|---|
committer | nimisha <nimisha.sharad@msystechnologies.com> | 2017-02-02 18:00:30 +0530 |
commit | aa155445b92e87baf1895ce092da3ae4c93117e6 (patch) | |
tree | cbb3f01bafeb456866e63674231f64386dc86f41 /spec/unit/provider/execute_spec.rb | |
parent | f0809fbb1c08ad14faed9c51f861a94373a39d27 (diff) | |
download | chef-aa155445b92e87baf1895ce092da3ae4c93117e6.tar.gz |
Rubocop violations in execute resource alternate user implementation
Diffstat (limited to 'spec/unit/provider/execute_spec.rb')
-rw-r--r-- | spec/unit/provider/execute_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/provider/execute_spec.rb b/spec/unit/provider/execute_spec.rb index e83e347fb6..a579b389df 100644 --- a/spec/unit/provider/execute_spec.rb +++ b/spec/unit/provider/execute_spec.rb @@ -251,12 +251,12 @@ describe Chef::Provider::Execute do context "when the username is specified" do before do - new_resource.user('starchild') + new_resource.user("starchild") end context "when the domain is specified" do before do - new_resource.domain('mydomain') + new_resource.domain("mydomain") end it "should raise an error if the password is not specified" do @@ -265,7 +265,7 @@ describe Chef::Provider::Execute do end it "should not raise an error if the password is specified" do - expect(new_resource).to receive(:password).at_least(1).times.and_return('we.funk!') + expect(new_resource).to receive(:password).at_least(1).times.and_return("we.funk!") expect { provider.run_action(:run) }.not_to raise_error end end @@ -281,7 +281,7 @@ describe Chef::Provider::Execute do end it "should not raise an error if the password is specified" do - expect(new_resource).to receive(:password).at_least(1).times.and_return('we.funk!') + expect(new_resource).to receive(:password).at_least(1).times.and_return("we.funk!") expect { provider.run_action(:run) }.not_to raise_error end @@ -294,18 +294,18 @@ describe Chef::Provider::Execute do end it "should raise an error if the password is specified" do - expect(new_resource).to receive(:password).at_least(1).times.and_return('we.funk!') + expect(new_resource).to receive(:password).at_least(1).times.and_return("we.funk!") expect { provider.run_action(:run) }.to raise_error(ArgumentError) end it "should raise an error if the domain is specified" do - expect(new_resource).to receive(:domain).at_least(1).times.and_return('mothership') + expect(new_resource).to receive(:domain).at_least(1).times.and_return("mothership") expect { provider.run_action(:run) }.to raise_error(ArgumentError) end it "should raise an error if the domain and password are specified" do - expect(new_resource).to receive(:password).at_least(1).times.and_return('we.funk!') - expect(new_resource).to receive(:domain).at_least(1).times.and_return('mothership') + expect(new_resource).to receive(:password).at_least(1).times.and_return("we.funk!") + expect(new_resource).to receive(:domain).at_least(1).times.and_return("mothership") expect { provider.run_action(:run) }.to raise_error(ArgumentError) end end @@ -317,16 +317,16 @@ describe Chef::Provider::Execute do end it "should not raise an error if the user is specified" do - new_resource.user('starchild') + new_resource.user("starchild") end it "should raise an error if the password is specified" do - expect(new_resource).to receive(:password).and_return('we.funk!') + expect(new_resource).to receive(:password).and_return("we.funk!") expect { provider.run_action(:run) }.to raise_error(Chef::Exceptions::UnsupportedPlatform) end it "should raise an error if the domain is specified" do - expect(new_resource).to receive(:domain).and_return('we.funk!') + expect(new_resource).to receive(:domain).and_return("we.funk!") expect { provider.run_action(:run) }.to raise_error(Chef::Exceptions::UnsupportedPlatform) end end |