Sha256: dad9c9472f4e7c2e476de032c9ea1239e2080ac3f22a2ae6f254a838b0aeb276

Contents?: true

Size: 753 Bytes

Versions: 3

Compression:

Stored size: 753 Bytes

Contents

require "spec_helper"

module LicenseFinder
  describe BundleSyncer do
    describe "#sync!" do
      it "should delegate the bundled dependencies and the persisted bundled dependencies to the source syncer" do
        gem = double :gem, :to_dependency => double(:gem_dependency)
        bundled_dep = double :bundled_dep, source: "bundle"
        manual_dep  = double :manual_dep, source: nil
        syncer = double :source_syncer

        Bundle.stub_chain(:new, :gems).and_return [gem]
        Dependency.stub(:all).and_return [bundled_dep, manual_dep]
        SourceSyncer.should_receive(:new).with([gem.to_dependency], [bundled_dep]).and_return syncer
        syncer.should_receive(:sync!)

        BundleSyncer.sync!
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
license_finder-0.7.3 spec/lib/license_finder/bundle_syncer_spec.rb
license_finder-0.7.1 spec/lib/license_finder/bundle_syncer_spec.rb
license_finder-0.7.0 spec/lib/license_finder/bundle_syncer_spec.rb