summaryrefslogtreecommitdiff
path: root/spec/bundler/manifest_spec.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2009-07-16 13:38:58 -0700
committerCarl Lerche <carllerche@mac.com>2009-07-16 13:38:58 -0700
commit573f460f9a35610245e5fdcda176cfd79be1baa3 (patch)
tree664815d32cd4a76a5c4b5471122a838782f18ae2 /spec/bundler/manifest_spec.rb
parent0c3afe6f694b2e7a4f67b2466f1332efe023a725 (diff)
downloadbundler-573f460f9a35610245e5fdcda176cfd79be1baa3.tar.gz
The manifest now creates a set of ruby files for each environment that sets the load paths correctly.
Diffstat (limited to 'spec/bundler/manifest_spec.rb')
-rw-r--r--spec/bundler/manifest_spec.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/spec/bundler/manifest_spec.rb b/spec/bundler/manifest_spec.rb
index 0909a737fb..5832e0b4b5 100644
--- a/spec/bundler/manifest_spec.rb
+++ b/spec/bundler/manifest_spec.rb
@@ -105,6 +105,8 @@ describe "Bundler::Manifest" do
describe "environments" do
before(:all) do
+ FileUtils.rm_rf(tmp_dir)
+ FileUtils.mkdir_p(tmp_dir)
@manifest = Bundler::Manifest.new(@sources,
[dep("very-simple", "1.0.0", :only => "testing"),
dep("rack", "1.0.0")], tmp_dir)
@@ -113,7 +115,7 @@ describe "Bundler::Manifest" do
end
it "can provide a list of environments" do
- @manifest.environments.should == ["testing", "minimal"]
+ @manifest.environments.should == ["testing", "default"]
end
it "knows what gems are in an environment" do
@@ -123,5 +125,18 @@ describe "Bundler::Manifest" do
@manifest.gems_for("production").should match_gems(
"rack" => ["1.0.0"])
end
+
+ it "can create load path files for each environment" do
+ tmp_file('environments', 'testing.rb').should have_load_paths(tmp_dir,
+ "very-simple-1.0" => %w(bin lib),
+ "rack-1.0.0" => %w(bin lib)
+ )
+
+ tmp_file('environments', 'default.rb').should have_load_paths(tmp_dir,
+ "rack-1.0.0" => %w(bin lib)
+ )
+
+ File.exist?(tmp_file('environments', "production.rb")).should be_false
+ end
end
end \ No newline at end of file