Sha256: cb52b2018765e1f2cd437e8a4489365af2e77580ced2382721dddbb684714129

Contents?: true

Size: 864 Bytes

Versions: 92

Compression:

Stored size: 864 Bytes

Contents

#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet/indirector/code'

describe Puppet::Indirector::Code do
  before :all do
    Puppet::Indirector::Terminus.stubs(:register_terminus_class)
    @model = mock 'model'
    @indirection = stub 'indirection', :name => :mystuff, :register_terminus_type => nil, :model => @model
    Puppet::Indirector::Indirection.stubs(:instance).returns(@indirection)

    module Testing; end
    @code_class = class Testing::MyCode < Puppet::Indirector::Code
      self
    end

    @searcher = @code_class.new
  end

  it "should not have a find() method defined" do
    @searcher.should_not respond_to(:find)
  end

  it "should not have a save() method defined" do
    @searcher.should_not respond_to(:save)
  end

  it "should not have a destroy() method defined" do
    @searcher.should_not respond_to(:destroy)
  end
end

Version data entries

92 entries across 92 versions & 2 rubygems

Version Path
puppet-3.8.7 spec/unit/indirector/code_spec.rb
puppet-3.8.7-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.7-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.6 spec/unit/indirector/code_spec.rb
puppet-3.8.6-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.6-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.5 spec/unit/indirector/code_spec.rb
puppet-3.8.5-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.5-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.4 spec/unit/indirector/code_spec.rb
puppet-3.8.4-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.4-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.3 spec/unit/indirector/code_spec.rb
puppet-3.8.3-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.3-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.2 spec/unit/indirector/code_spec.rb
puppet-3.8.2-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.2-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-3.8.1 spec/unit/indirector/code_spec.rb
puppet-3.8.1-x86-mingw32 spec/unit/indirector/code_spec.rb