summaryrefslogtreecommitdiff
path: root/spec/install/gemfile/groups_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install/gemfile/groups_spec.rb')
-rw-r--r--spec/install/gemfile/groups_spec.rb76
1 files changed, 38 insertions, 38 deletions
diff --git a/spec/install/gemfile/groups_spec.rb b/spec/install/gemfile/groups_spec.rb
index c338cc5d62..cb052b6c7a 100644
--- a/spec/install/gemfile/groups_spec.rb
+++ b/spec/install/gemfile/groups_spec.rb
@@ -15,11 +15,11 @@ describe "bundle install with groups" do
end
it "installs gems in the default group" do
- expect(the_bundle).to have_installed "rack 1.0.0"
+ expect(the_bundle).to include_gems "rack 1.0.0"
end
it "installs gems in a group block into that group" do
- expect(the_bundle).to have_installed "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "activesupport 2.3.5"
load_error_run <<-R, "activesupport", :default
require 'activesupport'
@@ -30,7 +30,7 @@ describe "bundle install with groups" do
end
it "installs gems with inline :groups into those groups" do
- expect(the_bundle).to have_installed "thin 1.0"
+ expect(the_bundle).to include_gems "thin 1.0"
load_error_run <<-R, "thin", :default
require 'thin'
@@ -88,19 +88,19 @@ describe "bundle install with groups" do
it "installs gems in the default group" do
bundle :install, :without => "emo"
- expect(the_bundle).to have_installed "rack 1.0.0", :groups => [:default]
+ expect(the_bundle).to include_gems "rack 1.0.0", :groups => [:default]
end
it "does not install gems from the excluded group" do
bundle :install, :without => "emo"
- expect(the_bundle).not_to have_installed "activesupport 2.3.5", :groups => [:default]
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5", :groups => [:default]
end
it "does not install gems from the previously excluded group" do
bundle :install, :without => "emo"
- expect(the_bundle).not_to have_installed "activesupport 2.3.5"
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5"
bundle :install
- expect(the_bundle).not_to have_installed "activesupport 2.3.5"
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5"
end
it "does not say it installed gems from the excluded group" do
@@ -124,7 +124,7 @@ describe "bundle install with groups" do
G
bundle :install, :without => "emo"
- expect(the_bundle).to have_installed "activesupport 2.3.2", :groups => [:default]
+ expect(the_bundle).to include_gems "activesupport 2.3.2", :groups => [:default]
end
it "still works on a different machine and excludes gems" do
@@ -133,8 +133,8 @@ describe "bundle install with groups" do
simulate_new_machine
bundle :install, :without => "emo"
- expect(the_bundle).to have_installed "rack 1.0.0", :groups => [:default]
- expect(the_bundle).not_to have_installed "activesupport 2.3.5", :groups => [:default]
+ expect(the_bundle).to include_gems "rack 1.0.0", :groups => [:default]
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5", :groups => [:default]
end
it "still works when BUNDLE_WITHOUT is set" do
@@ -143,8 +143,8 @@ describe "bundle install with groups" do
bundle :install
expect(out).not_to include("activesupport")
- expect(the_bundle).to have_installed "rack 1.0.0", :groups => [:default]
- expect(the_bundle).not_to have_installed "activesupport 2.3.5", :groups => [:default]
+ expect(the_bundle).to include_gems "rack 1.0.0", :groups => [:default]
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5", :groups => [:default]
ENV["BUNDLE_WITHOUT"] = nil
end
@@ -153,56 +153,56 @@ describe "bundle install with groups" do
bundle :install, :without => "emo"
bundle 'install --without ""'
- expect(the_bundle).to have_installed "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "activesupport 2.3.5"
end
it "doesn't clear without when nothing is passed" do
bundle :install, :without => "emo"
bundle :install
- expect(the_bundle).not_to have_installed "activesupport 2.3.5"
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5"
end
it "does not install gems from the optional group" do
bundle :install
- expect(the_bundle).not_to have_installed "thin 1.0"
+ expect(the_bundle).not_to include_gems "thin 1.0"
end
it "does install gems from the optional group when requested" do
bundle :install, :with => "debugging"
- expect(the_bundle).to have_installed "thin 1.0"
+ expect(the_bundle).to include_gems "thin 1.0"
end
it "does install gems from the previously requested group" do
bundle :install, :with => "debugging"
- expect(the_bundle).to have_installed "thin 1.0"
+ expect(the_bundle).to include_gems "thin 1.0"
bundle :install
- expect(the_bundle).to have_installed "thin 1.0"
+ expect(the_bundle).to include_gems "thin 1.0"
end
it "does install gems from the optional groups requested with BUNDLE_WITH" do
ENV["BUNDLE_WITH"] = "debugging"
bundle :install
- expect(the_bundle).to have_installed "thin 1.0"
+ expect(the_bundle).to include_gems "thin 1.0"
ENV["BUNDLE_WITH"] = nil
end
it "clears with when passed an empty list" do
bundle :install, :with => "debugging"
bundle 'install --with ""'
- expect(the_bundle).not_to have_installed "thin 1.0"
+ expect(the_bundle).not_to include_gems "thin 1.0"
end
it "does remove groups from without when passed at with" do
bundle :install, :without => "emo"
bundle :install, :with => "emo"
- expect(the_bundle).to have_installed "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "activesupport 2.3.5"
end
it "does remove groups from with when passed at without" do
bundle :install, :with => "debugging"
bundle :install, :without => "debugging"
- expect(the_bundle).not_to have_installed "thin 1.0"
+ expect(the_bundle).not_to include_gems "thin 1.0"
end
it "errors out when passing a group to with and without" do
@@ -212,18 +212,18 @@ describe "bundle install with groups" do
it "can add and remove a group at the same time" do
bundle :install, :with => "debugging", :without => "emo"
- expect(the_bundle).to have_installed "thin 1.0"
- expect(the_bundle).not_to have_installed "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "thin 1.0"
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5"
end
it "does have no effect when listing a not optional group in with" do
bundle :install, :with => "emo"
- expect(the_bundle).to have_installed "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "activesupport 2.3.5"
end
it "does have no effect when listing an optional group in without" do
bundle :install, :without => "debugging"
- expect(the_bundle).not_to have_installed "thin 1.0"
+ expect(the_bundle).not_to include_gems "thin 1.0"
end
end
@@ -240,12 +240,12 @@ describe "bundle install with groups" do
it "installs gems in the default group" do
bundle :install, :without => "emo lolercoaster"
- expect(the_bundle).to have_installed "rack 1.0.0"
+ expect(the_bundle).to include_gems "rack 1.0.0"
end
it "installs the gem if any of its groups are installed" do
bundle "install --without emo"
- expect(the_bundle).to have_installed "rack 1.0.0", "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "rack 1.0.0", "activesupport 2.3.5"
end
describe "with a gem defined multiple times in different groups" do
@@ -266,22 +266,22 @@ describe "bundle install with groups" do
it "installs the gem w/ option --without emo" do
bundle "install --without emo"
- expect(the_bundle).to have_installed "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "activesupport 2.3.5"
end
it "installs the gem w/ option --without lolercoaster" do
bundle "install --without lolercoaster"
- expect(the_bundle).to have_installed "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "activesupport 2.3.5"
end
it "does not install the gem w/ option --without emo lolercoaster" do
bundle "install --without emo lolercoaster"
- expect(the_bundle).not_to have_installed "activesupport 2.3.5"
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5"
end
it "does not install the gem w/ option --without 'emo lolercoaster'" do
bundle "install --without 'emo lolercoaster'"
- expect(the_bundle).not_to have_installed "activesupport 2.3.5"
+ expect(the_bundle).not_to include_gems "activesupport 2.3.5"
end
end
end
@@ -301,12 +301,12 @@ describe "bundle install with groups" do
it "installs gems in the default group" do
bundle :install, :without => "emo lolercoaster"
- expect(the_bundle).to have_installed "rack 1.0.0"
+ expect(the_bundle).to include_gems "rack 1.0.0"
end
it "installs the gem if any of its groups are installed" do
bundle "install --without emo"
- expect(the_bundle).to have_installed "rack 1.0.0", "activesupport 2.3.5"
+ expect(the_bundle).to include_gems "rack 1.0.0", "activesupport 2.3.5"
end
end
end
@@ -352,14 +352,14 @@ describe "bundle install with groups" do
end
it "uses the correct versions even if --without was used on the original" do
- expect(the_bundle).to have_installed "rack 0.9.1"
- expect(the_bundle).not_to have_installed "rack_middleware 1.0"
+ expect(the_bundle).to include_gems "rack 0.9.1"
+ expect(the_bundle).not_to include_gems "rack_middleware 1.0"
simulate_new_machine
bundle :install
- expect(the_bundle).to have_installed "rack 0.9.1"
- expect(the_bundle).to have_installed "rack_middleware 1.0"
+ expect(the_bundle).to include_gems "rack 0.9.1"
+ expect(the_bundle).to include_gems "rack_middleware 1.0"
end
it "does not hit the remote a second time" do