aboutsummaryrefslogtreecommitdiffstats
path: root/spec/runtime/load_spec.rb
diff options
context:
space:
mode:
authorSarah Allen <sarah@ultrasaurus.com>2010-10-24 09:25:31 -0700
committerAndre Arko <andre@arko.net>2010-10-24 18:29:03 -0700
commit3735dda8a4bf5a8606d3b2f248c35f052da564a8 (patch)
treeab96c4a9971eff26fa1d6d4438f9a892fbb0a4e6 /spec/runtime/load_spec.rb
parentfefc3340d3c31e25bdf6e6db5918e7122478795f (diff)
downloadbundler-3735dda8a4bf5a8606d3b2f248c35f052da564a8.tar.gz
make sure we don't accidentally find a Gemfile outside of source dir when testing
Closes #792 Closes #795
Diffstat (limited to 'spec/runtime/load_spec.rb')
-rw-r--r--spec/runtime/load_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb
index e18d39ff..6bc1f332 100644
--- a/spec/runtime/load_spec.rb
+++ b/spec/runtime/load_spec.rb
@@ -45,6 +45,16 @@ describe "Bundler.load" do
}.should raise_error(Bundler::GemfileNotFound, /omg\.rb/)
end
+ it "does not find a Gemfile above the testing directory" do
+ bundler_gemfile = tmp.join("../Gemfile")
+ unless File.exists?(bundler_gemfile)
+ FileUtils.touch(bundler_gemfile)
+ @remove_bundler_gemfile = true
+ end
+ lambda { Bundler.load }.should raise_error(Bundler::GemfileNotFound)
+ bundler_gemfile.rmtree if @remove_bundler_gemfile
+ end
+
describe "when called twice" do
it "doesn't try to load the runtime twice" do
system_gems "rack-1.0.0", "activesupport-2.3.5"