Sha256: bca7757bfa4394da5b320e0a29d925f35f9c295feffc4bc6ea61fc0af3410711

Contents?: true

Size: 931 Bytes

Versions: 28

Compression:

Stored size: 931 Bytes

Contents

#!/usr/bin/env rspec

require 'spec_helper'

module MCollective
  describe Vendor do
    describe "#vendor_dir" do
      it "should return correct vendor directory" do
        specdir = File.dirname(__FILE__)
        expected_dir = File.expand_path("#{specdir}/../../../lib/mcollective/vendor")
        Vendor.vendor_dir.should == expected_dir
      end
    end

    describe "#load_entry" do
      it "should attempt to load the correct path" do
        specdir = File.dirname(__FILE__)
        expected_dir = File.expand_path("#{specdir}/../../../lib/mcollective/vendor")

        Class.any_instance.stubs("load").with("#{expected_dir}/foo").once

        Vendor.load_entry("foo")
      end
    end

    describe "#require_libs" do
      it "should require the vendor loader" do
        Class.any_instance.stubs("require").with("mcollective/vendor/require_vendored").once

        Vendor.require_libs
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
mcollective-client-2.12.5 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.12.4 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.12.3 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.12.1 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.12.0 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.10.6 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.11.4 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.11.3 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.11.2 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.11.1 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.11.0 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.10.4 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.10.3 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.10.2 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.10.1 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.10.0 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.8.7 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.8.5 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.8.8 spec/unit/mcollective/vendor_spec.rb
mcollective-client-2.8.6 spec/unit/mcollective/vendor_spec.rb