File: none_spec.rb

package info (click to toggle)
puppet 4.8.2-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,736 kB
  • ctags: 14,616
  • sloc: ruby: 236,754; xml: 1,586; sh: 1,178; lisp: 299; sql: 103; yacc: 72; makefile: 52
file content (28 lines) | stat: -rw-r--r-- 915 bytes parent folder | download | duplicates (7)
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
    expect(Puppet::DataBinding::None.superclass).to equal(Puppet::Indirector::None)
  end

  it "should have documentation" do
    expect(Puppet::DataBinding::None.doc).not_to be_nil
  end

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

  it "should have its name set to :none" do
    expect(Puppet::DataBinding::None.name).to eq(:none)
  end

  describe "the behavior of the find method" do
    it "should just throw :no_such_key" do
      data_binding = Puppet::DataBinding::None.new
      expect { data_binding.find('fake_request') }.to throw_symbol(:no_such_key)
    end
  end
end