summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-04-15 15:53:51 -0700
committerNick Lewis <nick@puppetlabs.com>2011-04-15 15:53:51 -0700
commite946a17bf7d8c728adc8ab8868d67ebb2832b703 (patch)
tree053d3023cd03f92e4abc075a130edbed7d8402ac /spec/unit/node
parent0d0318f9f0eadff7f9934d3d02a7081bba05164c (diff)
downloadpuppet-e946a17bf7d8c728adc8ab8868d67ebb2832b703.tar.gz
puppet-e946a17bf7d8c728adc8ab8868d67ebb2832b703.tar.xz
puppet-e946a17bf7d8c728adc8ab8868d67ebb2832b703.zip
maint: Fix a broken Puppet::Node::Facts spec
This was breaking in other timezones because it was comparing to a string literal representation of a time, which really varies between timezones.
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/facts_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/node/facts_spec.rb b/spec/unit/node/facts_spec.rb
index 0a5948cfa..ab462b394 100755
--- a/spec/unit/node/facts_spec.rb
+++ b/spec/unit/node/facts_spec.rb
@@ -126,7 +126,7 @@ describe Puppet::Node::Facts, "when indirecting" do
Time.stubs(:now).returns(@timestamp)
facts = Puppet::Node::Facts.new("foo", {'a' => 1, 'b' => 2, 'c' => 3})
facts.expiration = @expiration
- facts.to_pson.should == %Q[{"data":{"name":"foo","timestamp":"Thu Oct 28 11:16:31 -0700 2010","expiration":"Thu Oct 28 11:21:31 -0700 2010","values":{"a":1,"b":2,"c":3}},"document_type":"Puppet::Node::Facts"}]
+ facts.to_pson.should == %Q[{"data":{"name":"foo","timestamp":"#{@timestamp}","expiration":"Thu Oct 28 11:21:31 -0700 2010","values":{"a":1,"b":2,"c":3}},"document_type":"Puppet::Node::Facts"}]
end
it "should not include nil values" do