diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-03-22 16:44:01 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-03-22 17:18:51 -0700 |
| commit | 847ac203f9c0b5fce299e87a63b0de5d3ef416f6 (patch) | |
| tree | 1177637a9ae75527b14523d3803c610601e5d54b /spec/unit/interface/node_spec.rb | |
| parent | 01ce91816fe061267e9821c07fefb8aa14af4a14 (diff) | |
| download | puppet-847ac203f9c0b5fce299e87a63b0de5d3ef416f6.tar.gz puppet-847ac203f9c0b5fce299e87a63b0de5d3ef416f6.tar.xz puppet-847ac203f9c0b5fce299e87a63b0de5d3ef416f6.zip | |
maint: Implement an InterfaceCollection class to manage interfaces
Having an instance variable on class Interface is insufficient for
Interface::Indirector. This also changes the semantics of "Interface.interface"
to handle registration and loading actions, and for "Interface.new" to only
instantiate an Interface. Thus, consumers of the API should typically use
"Interface.interface", unless they have reasons to not want an interface
automatically registered.
Paired-With: Pieter van de Bruggen
Diffstat (limited to 'spec/unit/interface/node_spec.rb')
| -rw-r--r-- | spec/unit/interface/node_spec.rb | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/spec/unit/interface/node_spec.rb b/spec/unit/interface/node_spec.rb index 63109308d..b1b4ad421 100644 --- a/spec/unit/interface/node_spec.rb +++ b/spec/unit/interface/node_spec.rb @@ -3,26 +3,8 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/node' -describe Puppet::Interface.interface(:node) do - before do - @interface = Puppet::Interface.interface(:node) - end - - it "should be a subclass of 'Indirection'" do - @interface.should be_instance_of(Puppet::Interface::Indirector) - end - +describe Puppet::Interface::Indirector.interface(:node) do 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 - - [:find, :save, :search, :save].each do |method| - it "should have #{method} action defined" do - @interface.should be_action(method) - end + subject.default_format.should == :yaml end end |
