summaryrefslogtreecommitdiff
path: root/spec/bundler/runtime/require_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/runtime/require_spec.rb')
-rw-r--r--spec/bundler/runtime/require_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/bundler/runtime/require_spec.rb b/spec/bundler/runtime/require_spec.rb
index a3fa4fbe47..d91b5f8666 100644
--- a/spec/bundler/runtime/require_spec.rb
+++ b/spec/bundler/runtime/require_spec.rb
@@ -46,6 +46,7 @@ RSpec.describe "Bundler.require" do
end
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem "one", :group => :bar, :require => %w[baz qux]
gem "two"
@@ -112,6 +113,7 @@ RSpec.describe "Bundler.require" do
it "raises an exception if a require is specified but the file does not exist" do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem "two", :require => 'fail'
end
@@ -130,6 +132,7 @@ RSpec.describe "Bundler.require" do
end
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem "faulty"
end
@@ -146,6 +149,7 @@ RSpec.describe "Bundler.require" do
end
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem "loadfuuu"
end
@@ -172,6 +176,7 @@ RSpec.describe "Bundler.require" do
it "requires gem names that are namespaced" do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path '#{lib_path}' do
gem 'jquery-rails'
end
@@ -186,6 +191,8 @@ RSpec.describe "Bundler.require" do
s.write "lib/brcrypt.rb", "BCrypt = '1.0.0'"
end
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+
path "#{lib_path}" do
gem "bcrypt-ruby"
end
@@ -202,6 +209,7 @@ RSpec.describe "Bundler.require" do
it "does not mangle explicitly given requires" do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem 'jquery-rails', :require => 'jquery-rails'
end
@@ -219,6 +227,7 @@ RSpec.describe "Bundler.require" do
end
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem "load-fuuu"
end
@@ -242,6 +251,7 @@ RSpec.describe "Bundler.require" do
end
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem "load-fuuu"
end
@@ -300,6 +310,7 @@ RSpec.describe "Bundler.require" do
it "works when the gems are in the Gemfile in the correct order" do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem "two"
gem "one"
@@ -318,6 +329,7 @@ RSpec.describe "Bundler.require" do
end
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "multi_gem", :require => "one", :group => :one
gem "multi_gem", :require => "two", :group => :two
G
@@ -341,6 +353,7 @@ RSpec.describe "Bundler.require" do
it "fails when the gems are in the Gemfile in the wrong order" do
gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
path "#{lib_path}" do
gem "one"
gem "two"
@@ -358,6 +371,7 @@ RSpec.describe "Bundler.require" do
end
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "busted_require"
G
@@ -396,6 +410,7 @@ RSpec.describe "Bundler.require" do
build_git "foo"
install_gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
gem "foo", :git => "#{lib_path("foo-1.0")}"
G