Permalink
Browse files

Adding a spec for :except with --only

  • Loading branch information...
1 parent c8a4fd9 commit 150d8bc014bead2123ac41382ae6097652292a1c Yehuda Katz committed Nov 9, 2009
Showing with 26 additions and 0 deletions.
  1. +26 −0 spec/bundler/cli_spec.rb
View
26 spec/bundler/cli_spec.rb
@@ -380,6 +380,32 @@
end
end
+ describe "bundling all but certain environments" do
+ before(:each) do
+ build_manifest <<-Gemfile
+ clear_sources
+ source "file://#{gem_repo1}"
+ gem "extlib"
+ gem "very-simple", :except => :test
+ gem "rack", :except => :server
+ Gemfile
+
+ %w(doc environment.rb gems specifications).each do |f|
+ FileUtils.rm_rf(tmp_gem_path.join(f))
+ end
+ end
+
+ it "install gems for environments specified in --only line" do
+ Dir.chdir(bundled_app) do
+ gem_command :bundle, "--only test"
+ bundled_app('vendor', 'gems', 'environment.rb').should have_load_paths(bundled_app("vendor", "gems"),
+ "extlib-0.9.12" => %w(lib),
+ "rack-0.9.1" => %w(bin lib)
+ )
+ end
+ end
+ end
+
describe "caching gems to the bundle" do
before(:each) do
build_manifest <<-Gemfile

0 comments on commit 150d8bc

Please sign in to comment.