bundle-new/spec/bundler/source/rubygems_spec.rb

26 lines
607 B
Ruby
Raw Permalink Normal View History

2019-10-06 15:45:34 +00:00
require 'spec_helper'
describe Bundler::Source::Rubygems do
before do
allow(Bundler).to receive(:root){ Pathname.new("root") }
end
describe "caches" do
it "includes Bundler.app_cache" do
expect(subject.caches).to include(Bundler.app_cache)
end
it "includes GEM_PATH entries" do
Gem.path.each do |path|
expect(subject.caches).to include(File.expand_path("#{path}/cache"))
end
end
it "is an array of strings or pathnames" do
subject.caches.each do |cache|
expect([String, Pathname]).to include(cache.class)
end
end
end
end