Sha256: df8d1d3d82a8be5c93c26d728bc8c96cb2d09b80455b7aa42d44c2844ae64cab

Contents?: true

Size: 808 Bytes

Versions: 19

Compression:

Stored size: 808 Bytes

Contents

#!/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

  it "should have a name" do
    Puppet::Status.new.name
  end

  it "should allow a name to be set" do
    Puppet::Status.new.name = "status"
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
puppet-2.6.18 spec/unit/status_spec.rb
puppet-2.6.17 spec/unit/status_spec.rb
puppet-2.6.16 spec/unit/status_spec.rb
puppet-2.6.15 spec/unit/status_spec.rb
puppet-2.6.14 spec/unit/status_spec.rb
puppet-2.6.13 spec/unit/status_spec.rb
puppet-2.6.12 spec/unit/status_spec.rb
puppet-2.6.11 spec/unit/status_spec.rb
puppet-2.6.10 spec/unit/status_spec.rb
puppet-2.6.9 spec/unit/status_spec.rb
puppet-2.6.8 spec/unit/status_spec.rb
puppet-2.6.7 spec/unit/status_spec.rb
puppet-2.6.6 spec/unit/status_spec.rb
puppet-2.6.5 spec/unit/status_spec.rb
puppet-2.6.4 spec/unit/status_spec.rb
puppet-2.6.3 spec/unit/status_spec.rb
puppet-2.6.2 spec/unit/status_spec.rb
puppet-2.6.1 spec/unit/status_spec.rb
puppet-2.6.0 spec/unit/status_spec.rb