summaryrefslogtreecommitdiff
path: root/spec/unit/provider/mdadm_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/provider/mdadm_spec.rb')
-rw-r--r--spec/unit/provider/mdadm_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/provider/mdadm_spec.rb b/spec/unit/provider/mdadm_spec.rb
index 8ef884e131..17824c4fb8 100644
--- a/spec/unit/provider/mdadm_spec.rb
+++ b/spec/unit/provider/mdadm_spec.rb
@@ -32,20 +32,20 @@ describe Chef::Provider::Mdadm do
describe "when determining the current metadevice status" do
it "should set the current resources mount point to the new resources mount point" do
- allow(@provider).to receive(:shell_out!).and_return(OpenStruct.new(:status => 0))
+ allow(@provider).to receive(:shell_out!).and_return(OpenStruct.new(status: 0))
@provider.load_current_resource
expect(@provider.current_resource.name).to eq("/dev/md1")
expect(@provider.current_resource.raid_device).to eq("/dev/md1")
end
it "determines that the metadevice exists when mdadm exit code is zero" do
- allow(@provider).to receive(:shell_out!).with("mdadm --detail --test /dev/md1", :returns => [0, 4]).and_return(OpenStruct.new(:status => 0))
+ allow(@provider).to receive(:shell_out!).with("mdadm --detail --test /dev/md1", returns: [0, 4]).and_return(OpenStruct.new(status: 0))
@provider.load_current_resource
expect(@provider.current_resource.exists).to be_truthy
end
it "determines that the metadevice does not exist when mdadm exit code is 4" do
- allow(@provider).to receive(:shell_out!).with("mdadm --detail --test /dev/md1", :returns => [0, 4]).and_return(OpenStruct.new(:status => 4))
+ allow(@provider).to receive(:shell_out!).with("mdadm --detail --test /dev/md1", returns: [0, 4]).and_return(OpenStruct.new(status: 4))
@provider.load_current_resource
expect(@provider.current_resource.exists).to be_falsey
end