Sha256: d0b7a7a52616b74bffb7177af6d2fd6267a87fb739ff8dc1f9c0c7a8313beeaa

Contents?: true

Size: 903 Bytes

Versions: 19

Compression:

Stored size: 903 Bytes

Contents

#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../../spec_helper'
require 'puppet/indirector/code'

describe Puppet::Indirector::Code do
  before 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)

    @code_class = Class.new(Puppet::Indirector::Code) do
      def self.to_s
        "Mystuff::Testing"
      end
    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

19 entries across 19 versions & 1 rubygems

Version Path
puppet-2.6.18 spec/unit/indirector/code_spec.rb
puppet-2.6.17 spec/unit/indirector/code_spec.rb
puppet-2.6.16 spec/unit/indirector/code_spec.rb
puppet-2.6.15 spec/unit/indirector/code_spec.rb
puppet-2.6.14 spec/unit/indirector/code_spec.rb
puppet-2.6.13 spec/unit/indirector/code_spec.rb
puppet-2.6.12 spec/unit/indirector/code_spec.rb
puppet-2.6.11 spec/unit/indirector/code_spec.rb
puppet-2.6.10 spec/unit/indirector/code_spec.rb
puppet-2.6.9 spec/unit/indirector/code_spec.rb
puppet-2.6.8 spec/unit/indirector/code_spec.rb
puppet-2.6.7 spec/unit/indirector/code_spec.rb
puppet-2.6.6 spec/unit/indirector/code_spec.rb
puppet-2.6.5 spec/unit/indirector/code_spec.rb
puppet-2.6.4 spec/unit/indirector/code_spec.rb
puppet-2.6.3 spec/unit/indirector/code_spec.rb
puppet-2.6.2 spec/unit/indirector/code_spec.rb
puppet-2.6.1 spec/unit/indirector/code_spec.rb
puppet-2.6.0 spec/unit/indirector/code_spec.rb