summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/ssl/base.rb2
-rwxr-xr-xspec/unit/ssl/certificate.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/ssl/base.rb b/lib/puppet/ssl/base.rb
index a005bfaf0..d67861f4b 100644
--- a/lib/puppet/ssl/base.rb
+++ b/lib/puppet/ssl/base.rb
@@ -34,7 +34,7 @@ class Puppet::SSL::Base
end
def initialize(name)
- @name = name.downcase
+ @name = name.to_s.downcase
end
# Read content from disk appropriately.
diff --git a/spec/unit/ssl/certificate.rb b/spec/unit/ssl/certificate.rb
index 92b7f2cd6..a092c6abe 100755
--- a/spec/unit/ssl/certificate.rb
+++ b/spec/unit/ssl/certificate.rb
@@ -86,8 +86,8 @@ describe Puppet::SSL::Certificate do
@certificate.name.should == "myname"
end
- it "should downcase its name" do
- @class.new("MyName").name.should == "myname"
+ it "should convert its name to a string and downcase it" do
+ @class.new(:MyName).name.should == "myname"
end
it "should have a content attribute" do