diff options
| author | Paul Berry <paul@puppetlabs.com> | 2010-12-29 15:33:14 -0800 |
|---|---|---|
| committer | Paul Berry <paul@puppetlabs.com> | 2010-12-30 11:53:16 -0800 |
| commit | 716ee1cd76a2b30c10e715bca3e22896d9c4e36f (patch) | |
| tree | e7ea2e94a99dd842abad74c417e9c104bc986dfa /spec/unit/util | |
| parent | 037eac4383ed5a5e9cdde765b607a180209bad1e (diff) | |
| download | puppet-716ee1cd76a2b30c10e715bca3e22896d9c4e36f.tar.gz puppet-716ee1cd76a2b30c10e715bca3e22896d9c4e36f.tar.xz puppet-716ee1cd76a2b30c10e715bca3e22896d9c4e36f.zip | |
(#5715) Changed the type of metric names to always be strings.
Diffstat (limited to 'spec/unit/util')
| -rwxr-xr-x | spec/unit/util/metric_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/util/metric_spec.rb b/spec/unit/util/metric_spec.rb index 72571ee4a..600b88f85 100755 --- a/spec/unit/util/metric_spec.rb +++ b/spec/unit/util/metric_spec.rb @@ -59,7 +59,7 @@ describe Puppet::Util::Metric do end it "should support a label for values" do - @metric.newvalue(:foo, 10, "label") + @metric.newvalue("foo", 10, "label") @metric.values[0][1].should == "label" end @@ -69,19 +69,19 @@ describe Puppet::Util::Metric do end it "should return its values sorted by label" do - @metric.newvalue(:foo, 10, "b") - @metric.newvalue(:bar, 10, "a") + @metric.newvalue("foo", 10, "b") + @metric.newvalue("bar", 10, "a") - @metric.values.should == [[:bar, "a", 10], [:foo, "b", 10]] + @metric.values.should == [["bar", "a", 10], ["foo", "b", 10]] end it "should use an array indexer method to retrieve individual values" do - @metric.newvalue(:foo, 10) - @metric[:foo].should == 10 + @metric.newvalue("foo", 10) + @metric["foo"].should == 10 end it "should return nil if the named value cannot be found" do - @metric[:foo].should == 0 + @metric["foo"].should == 0 end # LAK: I'm not taking the time to develop these tests right now. |
