diff options
author | Luke Kanies <luke@puppetlabs.com> | 2011-03-02 17:32:07 -0800 |
---|---|---|
committer | Luke Kanies <luke@puppetlabs.com> | 2011-03-02 17:32:07 -0800 |
commit | ece0c8e8defeec7af5aa28bb583bbb69aaba79a9 (patch) | |
tree | 807f24f073e20bdf806a77c21e588c0c3a7cce25 | |
parent | 63263a41ab361985845ef514a3d1247a41f46475 (diff) | |
download | puppet-ece0c8e8defeec7af5aa28bb583bbb69aaba79a9.tar.gz puppet-ece0c8e8defeec7af5aa28bb583bbb69aaba79a9.tar.xz puppet-ece0c8e8defeec7af5aa28bb583bbb69aaba79a9.zip |
Fixing #16 - nodes default to yaml
We don't have json support for node output yet.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
-rw-r--r-- | lib/puppet/interface/node.rb | 1 | ||||
-rw-r--r-- | spec/unit/interface/node_spec.rb | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/interface/node.rb b/lib/puppet/interface/node.rb index 7d7362d8b..0a0f57a1e 100644 --- a/lib/puppet/interface/node.rb +++ b/lib/puppet/interface/node.rb @@ -1,4 +1,5 @@ require 'puppet/interface/indirector' Puppet::Interface::Indirector.new(:node) do + set_default_format :yaml end diff --git a/spec/unit/interface/node_spec.rb b/spec/unit/interface/node_spec.rb index afb609d2b..63109308d 100644 --- a/spec/unit/interface/node_spec.rb +++ b/spec/unit/interface/node_spec.rb @@ -12,6 +12,10 @@ describe Puppet::Interface.interface(:node) do @interface.should be_instance_of(Puppet::Interface::Indirector) end + it "should set its default format to :yaml" do + @interface.default_format.should == :yaml + end + it "should refer to the 'node' indirection" do @interface.indirection.name.should == :node end |