spec/unit/face/node_spec.rb in puppet-2.7.18 vs spec/unit/face/node_spec.rb in puppet-2.7.19
- old
+ new
@@ -46,29 +46,30 @@
it "should have a clean action" do
subject.should be_action :clean
end
it "should not accept a call with no arguments" do
- expect { subject.clean() }.should raise_error
+ expect { subject.clean() }.to raise_error
end
it "should accept a node name" do
- expect { subject.clean('hostname') }.should_not raise_error
+ expect { subject.clean('hostname') }.to_not raise_error
end
it "should accept more than one node name" do
expect do
subject.clean('hostname', 'hostname2', {})
- end.should_not raise_error
+ end.to_not raise_error
expect do
subject.clean('hostname', 'hostname2', 'hostname3', { :unexport => true })
- end.should_not raise_error
+ end.to_not raise_error
end
it "should accept the option --unexport" do
- expect { subject.help('hostname', :unexport => true) }.
- should_not raise_error ArgumentError
+ expect {
+ subject.help('hostname', :unexport => true)
+ }.to_not raise_error(ArgumentError)
end
context "clean action" do
subject { Puppet::Face[:node, :current] }
before :each do