summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-10-19 17:10:10 -0700
committerAndre Arko <andre@arko.net>2013-10-19 17:29:16 -0700
commit00afb3cedc7046c9c26f5666099ebaa60f3185db (patch)
tree1eb80a874cf0a0017373466b01fb2a14a3291ed7 /spec
parenta85533aecbc6445bc29097457cb58758e1995573 (diff)
downloadbundler-00afb3cedc7046c9c26f5666099ebaa60f3185db.tar.gz
move invalid specs to gemfile and path specs
Diffstat (limited to 'spec')
-rw-r--r--spec/install/gemfile_spec.rb33
-rw-r--r--spec/install/invalid_spec.rb50
-rw-r--r--spec/install/path_spec.rb18
3 files changed, 43 insertions, 58 deletions
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb
index c553b629ff..497aab065d 100644
--- a/spec/install/gemfile_spec.rb
+++ b/spec/install/gemfile_spec.rb
@@ -1,13 +1,30 @@
require "spec_helper"
-describe "bundle install with Gemfile" do
-
- it "will display a warning if a gem is duplicated" do
- install_gemfile <<-G
- gem 'rails', '~> 4.0.0'
- gem 'rails', '~> 4.0.0'
- G
- expect(out).to include("more than once")
+describe "bundle install" do
+
+ context "with duplicated gems" do
+ it "will display a warning" do
+ install_gemfile <<-G
+ gem 'rails', '~> 4.0.0'
+ gem 'rails', '~> 4.0.0'
+ G
+ expect(out).to include("more than once")
+ end
+ end
+
+ context "with deprecated features" do
+ before :each do
+ in_app_root
+ end
+
+ it "reports that lib is an invalid option" do
+ gemfile <<-G
+ gem "rack", :lib => "rack"
+ G
+
+ bundle :install
+ expect(out).to match(/You passed :lib as an option for gem 'rack', but it is invalid/)
+ end
end
end \ No newline at end of file
diff --git a/spec/install/invalid_spec.rb b/spec/install/invalid_spec.rb
deleted file mode 100644
index 3dd8a4ff72..0000000000
--- a/spec/install/invalid_spec.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-require "spec_helper"
-
-describe "bundle install with deprecated features" do
- before :each do
- in_app_root
- end
-
- it "reports that lib is an invalid option" do
- gemfile <<-G
- gem "rack", :lib => "rack"
- G
-
- bundle :install
- expect(out).to match(/You passed :lib as an option for gem 'rack', but it is invalid/)
- end
-
-end
-
-describe "bundle install to a dead symlink" do
- before do
- in_app_root do
- `ln -s /tmp/idontexist bundle`
- end
- end
-
- it "reports the symlink is dead" do
- gemfile <<-G
- source "file://#{gem_repo1}"
- gem "rack"
- G
-
- bundle "install --path bundle"
- expect(out).to match(/invalid symlink/)
- end
-end
-
-describe "invalid or inaccessible gem source" do
- it "can be retried" do
- gemfile <<-G
- source "file://#{gem_repo_missing}"
- gem "rack"
- gem "signed_gem"
- G
- bundle "install", :retry => 2
- exp = Regexp.escape("Retrying source fetch due to error (2/3)")
- expect(out).to match(exp)
- exp = Regexp.escape("Retrying source fetch due to error (3/3)")
- expect(out).to match(exp)
- end
-end \ No newline at end of file
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
index ef95f99cc6..c5c7e0db2f 100644
--- a/spec/install/path_spec.rb
+++ b/spec/install/path_spec.rb
@@ -129,4 +129,22 @@ describe "bundle install" do
end
end
+ describe "to a dead symlink" do
+ before do
+ in_app_root do
+ `ln -s /tmp/idontexist bundle`
+ end
+ end
+
+ it "reports the symlink is dead" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+
+ bundle "install --path bundle"
+ expect(out).to match(/invalid symlink/)
+ end
+ end
+
end \ No newline at end of file