Sha256: 2d4b71347bf76c69f7da11f066c1dade99a56c990411150eeb8f76ddcd707ff4

Contents?: true

Size: 925 Bytes

Versions: 17

Compression:

Stored size: 925 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

17 entries across 17 versions & 1 rubygems

Version Path
mcollective-client-2.7.0 spec/unit/vendor_spec.rb
mcollective-client-2.6.1 spec/unit/vendor_spec.rb
mcollective-client-2.6.0 spec/unit/vendor_spec.rb
mcollective-client-2.5.3 spec/unit/vendor_spec.rb
mcollective-client-2.5.2 spec/unit/vendor_spec.rb
mcollective-client-2.5.1 spec/unit/vendor_spec.rb
mcollective-client-2.5.0 spec/unit/vendor_spec.rb
mcollective-client-2.5.0.rc1 spec/unit/vendor_spec.rb
mcollective-client-2.4.1 spec/unit/vendor_spec.rb
mcollective-client-2.4.0 spec/unit/vendor_spec.rb
mcollective-client-2.2.4 spec/unit/vendor_spec.rb
mcollective-client-2.2.3 spec/unit/vendor_spec.rb
mcollective-client-2.2.2 spec/unit/vendor_spec.rb
mcollective-client-2.2.1 spec/unit/vendor_spec.rb
mcollective-client-2.2.0 spec/unit/vendor_spec.rb
mcollective-client-2.0.0 spec/unit/vendor_spec.rb
mcollective-client-1.3.3 spec/unit/vendor_spec.rb