Skip to content

Commit ceeab22

Browse files
committed
Adding spec for to_s
1 parent bf483d9 commit ceeab22

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

chef/spec/unit/resource_definition_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
end
4444

4545
it "should expose the prototype hash params in the params hash" do
46-
@def.define :smoke, :cigar => "cuban", :cigarette => "marlboro" do
47-
end
46+
@def.define :smoke, :cigar => "cuban", :cigarette => "marlboro" do; end
4847
@def.params[:cigar].should eql("cuban")
4948
@def.params[:cigarette].should eql("marlboro")
5049
end
@@ -80,4 +79,9 @@
8079
@def.name.should eql(:rico_suave)
8180
@def.params[:rich].should eql("smooth")
8281
end
82+
83+
it "should turn itself into a string based on the name with to_s" do
84+
@def.name = :woot
85+
@def.to_s.should eql("woot")
86+
end
8387
end

0 commit comments

Comments
 (0)