The test was expecting the current time, albeit as an integer.

Signed-off-by: Luke Kanies <[EMAIL PROTECTED]>
---
 lib/puppet/network/handler/master.rb |    2 +-
 test/network/handler/master.rb       |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/puppet/network/handler/master.rb 
b/lib/puppet/network/handler/master.rb
index 05ae7b9..71b633a 100644
--- a/lib/puppet/network/handler/master.rb
+++ b/lib/puppet/network/handler/master.rb
@@ -24,7 +24,7 @@ class Puppet::Network::Handler
         # Tell a client whether there's a fresh config for it
         def freshness(client = nil, clientip = nil)
             # Always force a recompile.  Newer clients shouldn't do this (as 
of April 2008).
-            return 0
+            return Time.now.to_i
         end
 
         def initialize(hash = {})
diff --git a/test/network/handler/master.rb b/test/network/handler/master.rb
index d342af8..654404a 100755
--- a/test/network/handler/master.rb
+++ b/test/network/handler/master.rb
@@ -25,7 +25,9 @@ class TestMaster < Test::Unit::TestCase
         now1 = mock 'now1'
         Time.expects(:now).returns(now1)
 
-        assert_equal(@master.freshness, now1, "Did not return current time as 
freshness")
+        now1.expects(:to_i).returns 10
+
+        assert_equal(@master.freshness, 10, "Did not return current time as 
freshness")
     end
 
     def test_hostname_is_used_if_client_is_missing
-- 
1.5.3.7


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to