Sha256: 8242c344724a834bd62f002e311b68428c1f2e84f1d6acd36bd039a9f5397f6b

Contents?: true

Size: 876 Bytes

Versions: 234

Compression:

Stored size: 876 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
    expect(@searcher).not_to respond_to(:find)
  end

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

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

Version data entries

234 entries across 234 versions & 1 rubygems

Version Path
puppet-4.10.11 spec/unit/indirector/code_spec.rb
puppet-4.10.11-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-4.10.11-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-4.10.11-universal-darwin spec/unit/indirector/code_spec.rb
puppet-5.3.6 spec/unit/indirector/code_spec.rb
puppet-5.3.6-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-5.3.6-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-5.3.6-universal-darwin spec/unit/indirector/code_spec.rb
puppet-5.5.0 spec/unit/indirector/code_spec.rb
puppet-5.5.0-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-5.5.0-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-5.5.0-universal-darwin spec/unit/indirector/code_spec.rb
puppet-5.4.0 spec/unit/indirector/code_spec.rb
puppet-5.4.0-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-5.4.0-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-5.4.0-universal-darwin spec/unit/indirector/code_spec.rb
puppet-5.3.5 spec/unit/indirector/code_spec.rb
puppet-5.3.5-x86-mingw32 spec/unit/indirector/code_spec.rb
puppet-5.3.5-x64-mingw32 spec/unit/indirector/code_spec.rb
puppet-5.3.5-universal-darwin spec/unit/indirector/code_spec.rb