diff options
author | Andre Arko <andre@arko.net> | 2010-04-09 16:21:43 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2010-04-10 00:17:03 -0700 |
commit | 2c8d6ae761b2f24d23dd7c6db50da41b3584908b (patch) | |
tree | 825582505de35bae98076913bd402ddfbfce58a8 /spec/runtime/load_spec.rb | |
parent | 4f58bc6526c74af6441f6fe9a63346a9c92227c6 (diff) | |
download | bundler-2c8d6ae761b2f24d23dd7c6db50da41b3584908b.tar.gz |
Don't call #setup after loading env.rb in Bundler.load
Diffstat (limited to 'spec/runtime/load_spec.rb')
-rw-r--r-- | spec/runtime/load_spec.rb | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb index 4adf12ce64..4c59c3f5cc 100644 --- a/spec/runtime/load_spec.rb +++ b/spec/runtime/load_spec.rb @@ -1,7 +1,6 @@ require File.expand_path('../../spec_helper', __FILE__) describe "Bundler.load" do - before :each do system_gems "rack-1.0.0" # clear memoized method results @@ -68,14 +67,43 @@ describe "Bundler.load" do end end - describe "not hurting brittle rubygems" do + describe "when locked" do before :each do - system_gems "activerecord-2.3.2", "activesupport-2.3.2" + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + G + bundle :lock + end + + it "loads env.rb instead of the runtime" do + ruby <<-R + require 'bundler' + Bundler.load + puts Bundler.instance_eval{ @runtime } + R + out.should == "nil" end + it "does not invoke setup inside env.rb" do + ruby <<-R, :expect_err => true + require 'bundler' + Bundler.load + if $LOAD_PATH.grep(/rack/i).any? + puts "nooo" + else + puts "hurrah" + end + R + + out.should == "hurrah" + end + end + + describe "not hurting brittle rubygems" do it "does not inject #source into the generated YAML of the gem specs" do + system_gems "activerecord-2.3.2", "activesupport-2.3.2" gemfile <<-G - source "file://#{gem_repo1}" gem "activerecord" G @@ -85,4 +113,5 @@ describe "Bundler.load" do end end end -end
\ No newline at end of file + +end |