aboutsummaryrefslogtreecommitdiffstats
path: root/spec/runtime/load_spec.rb
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-01-11 15:21:45 -0800
committerCarlhuda <carlhuda@engineyard.com>2010-01-11 15:21:45 -0800
commit67859e42a04e8f77a1d62779b1f2f2e34e4b62e8 (patch)
treed7cb6be0051d10bf8c36aa2a265e286b402beb09 /spec/runtime/load_spec.rb
parent2f424171ced5b852c2ab87336fa512df25998446 (diff)
downloadbundler-67859e42a04e8f77a1d62779b1f2f2e34e4b62e8.tar.gz
Moving in thor
Diffstat (limited to 'spec/runtime/load_spec.rb')
-rw-r--r--spec/runtime/load_spec.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb
new file mode 100644
index 00000000..9b60673b
--- /dev/null
+++ b/spec/runtime/load_spec.rb
@@ -0,0 +1,40 @@
+require File.expand_path('../../spec_helper', __FILE__)
+
+describe "Bubble.load" do
+
+ before :each do
+ in_app_root
+ system_gems "rack-1.0.0"
+ end
+
+ it "provides a list of the env dependencies" do
+ gemfile <<-G
+ gem "rack"
+ G
+
+ env = Bubble.load
+ env.dependencies.should have_dep("rack", ">= 0")
+ end
+
+ it "provides a list of the resolved gems" do
+ pending
+ gemfile <<-G
+ gem "rack"
+ G
+
+ env = Bubble.load
+ env.gems.should have_gem("rack-1.0.0")
+ end
+
+ it "raises an exception if the default gemfile is not found" do
+ lambda {
+ Bubble.load
+ }.should raise_error(Bubble::GemfileNotFound, /default/)
+ end
+
+ it "raises an exception if a specified gemfile is not found" do
+ lambda {
+ Bubble.load("omg.rb")
+ }.should raise_error(Bubble::GemfileNotFound, /omg\.rb/)
+ end
+end \ No newline at end of file