diff options
author | Davide Cavalca <dcavalca@fb.com> | 2016-02-22 16:22:49 -0800 |
---|---|---|
committer | Davide Cavalca <dcavalca@fb.com> | 2016-02-22 16:22:49 -0800 |
commit | e0c3ca2ac62421b656ad52aabfd1c68dd9b67433 (patch) | |
tree | 0fd1680050b249da52c013873947954e4185edc4 | |
parent | 012bf7f3de259d09309a66d2cac4a737ba38cf30 (diff) | |
download | chef-e0c3ca2ac62421b656ad52aabfd1c68dd9b67433.tar.gz |
spec nits
-rw-r--r-- | spec/unit/provider/service/systemd_service_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/provider/service/systemd_service_spec.rb b/spec/unit/provider/service/systemd_service_spec.rb index 740cbe21e9..cf76fdd07b 100644 --- a/spec/unit/provider/service/systemd_service_spec.rb +++ b/spec/unit/provider/service/systemd_service_spec.rb @@ -319,12 +319,12 @@ describe Chef::Provider::Service::Systemd do allow(provider).to receive(:which).with("systemctl").and_return("#{systemctl_path}") end - it "should return true if '#{systemctl_path} is-enabled service_name' returns 'masked' and exits with anything except 0" do + it "should return true if '#{systemctl_path} is-enabled service_name' returns 'masked' and returns anything except 0" do expect(provider).to receive(:shell_out).with("#{systemctl_path} is-enabled #{service_name}").and_return(double(:stdout => "masked", :exitstatus => shell_out_failure)) expect(provider.is_masked?).to be true end - it "should return true if '#{systemctl_path} is-enabled service_name' outputs 'masked-runtime' and returns with anything except 0" do + it "should return true if '#{systemctl_path} is-enabled service_name' outputs 'masked-runtime' and returns anything except 0" do expect(provider).to receive(:shell_out).with("#{systemctl_path} is-enabled #{service_name}").and_return(double(:stdout => "masked-runtime", :exitstatus => shell_out_failure)) expect(provider.is_masked?).to be true end @@ -334,8 +334,8 @@ describe Chef::Provider::Service::Systemd do expect(provider.is_masked?).to be false end - it "should return false if '#{systemctl_path} is-enabled service_name' returns with anything except 0 and outputs an error'" do - expect(provider).to receive(:shell_out).with("#{systemctl_path} is-enabled #{service_name}").and_return(double(:stdout => "Failed to get unit file state for foo.service: No such file or directory", :exitstatus => shell_out_success)) + it "should return false if '#{systemctl_path} is-enabled service_name' returns anything except 0 and outputs an error'" do + expect(provider).to receive(:shell_out).with("#{systemctl_path} is-enabled #{service_name}").and_return(double(:stdout => "Failed to get unit file state for #{service_name}: No such file or directory", :exitstatus => shell_out_failure)) expect(provider.is_masked?).to be false end end |