File: none_spec.rb

package info (click to toggle)
puppet 3.7.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 18,896 kB
  • sloc: ruby: 210,387; sh: 2,050; xml: 1,554; lisp: 300; makefile: 142; python: 108; sql: 103; yacc: 72
file content (28 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (3)
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
require 'spec_helper'
require 'puppet/indirector/data_binding/none'

describe Puppet::DataBinding::None do
  it "should be a subclass of the None terminus" do
    Puppet::DataBinding::None.superclass.should equal(Puppet::Indirector::None)
  end

  it "should have documentation" do
    Puppet::DataBinding::None.doc.should_not be_nil
  end

  it "should be registered with the data_binding indirection" do
    indirection = Puppet::Indirector::Indirection.instance(:data_binding)
    Puppet::DataBinding::None.indirection.should equal(indirection)
  end

  it "should have its name set to :none" do
    Puppet::DataBinding::None.name.should == :none
  end

  describe "the behavior of the find method" do
    it "should just return nil" do
      data_binding = Puppet::DataBinding::None.new
      data_binding.find('fake_request').should be_nil
    end
  end
end