summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-06-24 11:21:09 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-06-27 16:27:22 -0500
commit55c39a04e87e01193067314d6f41be8c30234fbd (patch)
treed9b93d4e60e5729bca53d509ab6605e03c26c375
parent994abbcbe4d90a97987b8d0bccf914f2fdf2b35d (diff)
downloadbundler-55c39a04e87e01193067314d6f41be8c30234fbd.tar.gz
Update specs for removal of global path source support
-rw-r--r--spec/install/gemfile/path_spec.rb10
-rw-r--r--spec/runtime/inline_spec.rb30
-rw-r--r--spec/runtime/require_spec.rb78
3 files changed, 69 insertions, 49 deletions
diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb
index fd5e799048..2adacf4dca 100644
--- a/spec/install/gemfile/path_spec.rb
+++ b/spec/install/gemfile/path_spec.rb
@@ -6,8 +6,9 @@ describe "bundle install with explicit source paths" do
build_lib "foo"
install_gemfile <<-G
- path "#{lib_path("foo-1.0")}"
- gem 'foo'
+ path "#{lib_path("foo-1.0")}" do
+ gem 'foo'
+ end
G
should_be_installed("foo 1.0")
@@ -273,8 +274,9 @@ describe "bundle install with explicit source paths" do
end
install_gemfile <<-G
- path "#{lib_path("foo-1.0")}"
- gem 'foo'
+ path "#{lib_path("foo-1.0")}" do
+ gem 'foo'
+ end
G
bundle "exec foobar"
diff --git a/spec/runtime/inline_spec.rb b/spec/runtime/inline_spec.rb
index dc429bf5c0..32686efa45 100644
--- a/spec/runtime/inline_spec.rb
+++ b/spec/runtime/inline_spec.rb
@@ -53,8 +53,9 @@ describe "bundler/inline#gemfile" do
it "requires the gems" do
script <<-RUBY
gemfile do
- path "#{lib_path}"
- gem "two"
+ path "#{lib_path}" do
+ gem "two"
+ end
end
RUBY
@@ -63,8 +64,9 @@ describe "bundler/inline#gemfile" do
script <<-RUBY, :expect_err => true
gemfile do
- path "#{lib_path}"
- gem "eleven"
+ path "#{lib_path}" do
+ gem "eleven"
+ end
end
puts "success"
@@ -116,8 +118,9 @@ describe "bundler/inline#gemfile" do
it "raises an exception if passed unknown arguments" do
script <<-RUBY, :expect_err => true
gemfile(true, :arglebargle => true) do
- path "#{lib_path}"
- gem "two"
+ path "#{lib_path}" do
+ gem "two"
+ end
end
puts "success"
@@ -131,8 +134,9 @@ describe "bundler/inline#gemfile" do
require 'bundler'
options = { :ui => Bundler::UI::Shell.new }
gemfile(false, options) do
- path "#{lib_path}"
- gem "two"
+ path "#{lib_path}" do
+ gem "two"
+ end
end
puts "OKAY" if options.key?(:ui)
RUBY
@@ -162,8 +166,9 @@ describe "bundler/inline#gemfile" do
it "raises an exception if passed unknown arguments" do
script <<-RUBY, :expect_err => true
gemfile(true, :arglebargle => true) do
- path "#{lib_path}"
- gem "two"
+ path "#{lib_path}" do
+ gem "two"
+ end
end
puts "success"
@@ -177,8 +182,9 @@ describe "bundler/inline#gemfile" do
require 'bundler'
options = { :ui => Bundler::UI::Shell.new }
gemfile(false, options) do
- path "#{lib_path}"
- gem "two"
+ path "#{lib_path}" do
+ gem "two"
+ end
end
puts "OKAY" if options.key?(:ui)
RUBY
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb
index c9cb10eedf..676a2a9cea 100644
--- a/spec/runtime/require_spec.rb
+++ b/spec/runtime/require_spec.rb
@@ -39,15 +39,16 @@ describe "Bundler.require" do
end
gemfile <<-G
- path "#{lib_path}"
- gem "one", :group => :bar, :require => %w[baz qux]
- gem "two"
- gem "three", :group => :not
- gem "four", :require => false
- gem "five"
- gem "six", :group => "string"
- gem "seven", :group => :not
- gem "eight", :require => true, :group => :require_true
+ path "#{lib_path}" do
+ gem "one", :group => :bar, :require => %w[baz qux]
+ gem "two"
+ gem "three", :group => :not
+ gem "four", :require => false
+ gem "five"
+ gem "six", :group => "string"
+ gem "seven", :group => :not
+ gem "eight", :require => true, :group => :require_true
+ end
G
end
@@ -88,8 +89,9 @@ describe "Bundler.require" do
it "raises an exception if a require is specified but the file does not exist" do
gemfile <<-G
- path "#{lib_path}"
- gem "two", :require => 'fail'
+ path "#{lib_path}" do
+ gem "two", :require => 'fail'
+ end
G
load_error_run <<-R, "fail"
@@ -105,8 +107,9 @@ describe "Bundler.require" do
end
gemfile <<-G
- path "#{lib_path}"
- gem "faulty"
+ path "#{lib_path}" do
+ gem "faulty"
+ end
G
run "Bundler.require", :expect_err => true
@@ -120,8 +123,9 @@ describe "Bundler.require" do
end
gemfile <<-G
- path "#{lib_path}"
- gem "faulty"
+ path "#{lib_path}" do
+ gem "faulty"
+ end
G
run "Bundler.require", :expect_err => true
@@ -135,8 +139,9 @@ describe "Bundler.require" do
end
gemfile <<-G
- path "#{lib_path}"
- gem "loadfuuu"
+ path "#{lib_path}" do
+ gem "loadfuuu"
+ end
G
cmd = <<-RUBY
@@ -161,8 +166,9 @@ describe "Bundler.require" do
it "requires gem names that are namespaced" do
gemfile <<-G
- path '#{lib_path}'
- gem 'jquery-rails'
+ path "#{lib_path}" do
+ gem "jquery-rails"
+ end
G
run "Bundler.require"
@@ -174,8 +180,9 @@ describe "Bundler.require" do
s.write "lib/brcrypt.rb", "BCrypt = '1.0.0'"
end
gemfile <<-G
- path "#{lib_path}"
- gem "bcrypt-ruby"
+ path "#{lib_path}" do
+ gem "bcrypt-ruby"
+ end
G
cmd = <<-RUBY
@@ -189,8 +196,9 @@ describe "Bundler.require" do
it "does not mangle explictly given requires" do
gemfile <<-G
- path "#{lib_path}"
- gem 'jquery-rails', :require => 'jquery-rails'
+ path "#{lib_path}" do
+ gem 'jquery-rails', :require => 'jquery-rails'
+ end
G
load_error_run <<-R, "jquery-rails"
@@ -205,8 +213,9 @@ describe "Bundler.require" do
end
gemfile <<-G
- path "#{lib_path}"
- gem "load-fuuu"
+ path "#{lib_path}" do
+ gem "load-fuuu"
+ end
G
cmd = <<-RUBY
@@ -228,8 +237,9 @@ describe "Bundler.require" do
lib_path("load-fuuu-1.0.0/lib/load-fuuu.rb").rmtree
gemfile <<-G
- path "#{lib_path}"
- gem "load-fuuu"
+ path "#{lib_path}" do
+ gem "load-fuuu"
+ end
G
cmd = <<-RUBY
@@ -285,9 +295,10 @@ describe "Bundler.require" do
it "works when the gems are in the Gemfile in the correct order" do
gemfile <<-G
- path "#{lib_path}"
- gem "two"
- gem "one"
+ path "#{lib_path}" do
+ gem "two"
+ gem "one"
+ end
G
run "Bundler.require"
@@ -325,9 +336,10 @@ describe "Bundler.require" do
it "fails when the gems are in the Gemfile in the wrong order" do
gemfile <<-G
- path "#{lib_path}"
- gem "one"
- gem "two"
+ path "#{lib_path}" do
+ gem "one"
+ gem "two"
+ end
G
run "Bundler.require"