Sha256: 95e9883478caa33694ef99e5c45b8141c5958668b8b1b79f6d5a0d829615faf9

Contents?: true

Size: 1.08 KB

Versions: 4

Compression:

Stored size: 1.08 KB

Contents

# Polisher Vendor Specs
#
# Licensed under the MIT license
# Copyright (C) 2014 Red Hat, Inc.

require 'spec_helper'

require 'polisher/vendor'

module Polisher
  describe HasVendoredDeps do
    before(:each) do
      @obj = Object.new
      @obj.extend(HasVendoredDeps)
    end

    describe "#vendored_file_paths" do
      it "returns file marks in gem marked as vendored" do
        expected = [ 'vendor/foo.rb', 'vendor/bar/foo.rb']
        paths    = ['foo.rb'] + expected
        gem = Polisher::Gem.new
        gem.should_receive(:file_paths).and_return(paths)
        gem.vendored_file_paths.should == expected
      end
    end

    describe "#vendored" do
      it "returns list of vendored modules in gem" do
        gem = Polisher::Gem.new
        vendored = ['vendor/thor.rb', 'vendor/thor/foo.rb', 'vendor/biz/baz.rb']
        gem.should_receive(:vendored_file_paths).and_return(vendored)
        gem.vendored.should == {'thor' => nil, 'biz' => nil}
      end

      context "vendored module has VERSION.rb file" do
        it "returns version of vendored gems"
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
polisher-0.10.2 spec/vendor_spec.rb
polisher-0.10.1 spec/vendor_spec.rb
polisher-0.9.1 spec/vendor_spec.rb
polisher-0.8.1 spec/vendor_spec.rb