summaryrefslogtreecommitdiffstats
path: root/spec/unit/interface/node_spec.rb
blob: cfb15e38abcad24140291305d29b820e350ea092 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env ruby

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
require 'puppet/interface/node'

describe Puppet::Interface::Node do
  before do
    @interface = Puppet::Interface::Node
  end

  it "should be a subclass of 'Indirection'" 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

  [:find, :save, :search, :save].each do |method|
    it "should have  #{method} action defined" do
      @interface.should be_action(method)
    end
  end
end