summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-04-19 21:37:43 -0700
committerAndre Arko <andre@arko.net>2010-04-19 21:37:43 -0700
commit5452ee3a4ad281c02d55aa9707286741897285e3 (patch)
tree68212c1cfdbf25d52212217c7fc23ea714d7b803
parent133462d80c7ee8a7a39c9a70946a3357845b81a9 (diff)
downloadbundler-5452ee3a4ad281c02d55aa9707286741897285e3.tar.gz
Spec for error message when gemspecs raise LoadErrors
-rw-r--r--spec/runtime/environment_rb_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/runtime/environment_rb_spec.rb b/spec/runtime/environment_rb_spec.rb
index d2d7ae2f7a..cf92aeef17 100644
--- a/spec/runtime/environment_rb_spec.rb
+++ b/spec/runtime/environment_rb_spec.rb
@@ -136,6 +136,15 @@ describe "environment.rb file" do
out.should == "1.0"
end
+ it "error intelligently if the gemspec has a LoadError" do
+ update_git "bar", :gemspec => false do |s|
+ s.write "bar.gemspec", "require 'foobarbaz'"
+ end
+ bundle :install
+ out.should include("was a LoadError while evaluating bar.gemspec")
+ out.should include("try to require a relative path")
+ end
+
it "evals each gemspec with a binding from the top level" do
ruby <<-RUBY
require 'bundler'