diff options
Diffstat (limited to 'spec/unit/resource_definition_spec.rb')
-rw-r--r-- | spec/unit/resource_definition_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/resource_definition_spec.rb b/spec/unit/resource_definition_spec.rb index a1c59eaaca..2a45dd6725 100644 --- a/spec/unit/resource_definition_spec.rb +++ b/spec/unit/resource_definition_spec.rb @@ -53,26 +53,26 @@ describe Chef::ResourceDefinition do end it "should accept a new definition with a symbol for a name" do - expect do + expect { defn.define :smoke do end - end.not_to raise_error - expect do + }.not_to raise_error + expect { defn.define "george washington" do end - end.to raise_error(ArgumentError) + }.to raise_error(ArgumentError) expect(defn.name).to eql(:smoke) end it "should accept a new definition with a hash" do - expect do + expect { defn.define :smoke, cigar: "cuban", cigarette: "marlboro" do end - end.not_to raise_error + }.not_to raise_error end it "should expose the prototype hash params in the params hash" do - defn.define(:smoke, cigar: "cuban", cigarette: "marlboro") {} + defn.define(:smoke, cigar: "cuban", cigarette: "marlboro") do end expect(defn.params[:cigar]).to eql("cuban") expect(defn.params[:cigarette]).to eql("marlboro") end @@ -91,16 +91,16 @@ describe Chef::ResourceDefinition do end it "should raise an exception if prototype_params is not a hash" do - expect do + expect { defn.define :monkey, [] do end - end.to raise_error(ArgumentError) + }.to raise_error(ArgumentError) end it "should raise an exception if define is called without a block" do - expect do + expect { defn.define :monkey - end.to raise_error(ArgumentError) + }.to raise_error(ArgumentError) end it "should load a description from a file" do |