summaryrefslogtreecommitdiffstats
path: root/spec/unit/status.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/status.rb')
-rw-r--r--spec/unit/status.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/unit/status.rb b/spec/unit/status.rb
new file mode 100644
index 000000000..b13b246af
--- /dev/null
+++ b/spec/unit/status.rb
@@ -0,0 +1,23 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../spec_helper'
+
+describe Puppet::Status do
+ it "should implement find" do
+ Puppet::Status.find( :default ).should be_is_a(Puppet::Status)
+ Puppet::Status.find( :default ).status["is_alive"].should == true
+ end
+
+ it "should default to is_alive is true" do
+ Puppet::Status.new.status["is_alive"].should == true
+ end
+
+ it "should return a pson hash" do
+ Puppet::Status.new.status.to_pson.should == '{"is_alive":true}'
+ end
+
+ it "should accept a hash from pson" do
+ status = Puppet::Status.new( { "is_alive" => false } )
+ status.status.should == { "is_alive" => false }
+ end
+end