Skip to content

Commit

Permalink
Reword specs to not mention deprecated flags
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed May 31, 2020
1 parent cedf611 commit f878a81
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 33 deletions.
2 changes: 1 addition & 1 deletion bundler/spec/commands/cache_spec.rb
Expand Up @@ -242,7 +242,7 @@
end
end

context "with --frozen" do
context "with frozen configured" do
before do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
Expand Down
34 changes: 10 additions & 24 deletions bundler/spec/commands/post_bundle_message_spec.rb
Expand Up @@ -22,77 +22,69 @@
let(:bundle_show_message) { Bundler::VERSION.split(".").first.to_i < 3 ? bundle_show_system_message : bundle_show_path_message }

describe "for fresh bundle install" do
it "without any options" do
it "shows proper messages according to the configured groups" do
bundle :install
expect(out).to include(bundle_show_message)
expect(out).not_to include("Gems in the group")
expect(out).to include(bundle_complete_message)
expect(out).to include(installed_gems_stats)
end

it "with --without one group" do
bundle! :install, forgotten_command_line_options(:without => "emo")
expect(out).to include(bundle_show_message)
expect(out).to include("Gems in the group emo were not installed")
expect(out).to include(bundle_complete_message)
expect(out).to include(installed_gems_stats)
end

it "with --without two groups" do
bundle! :install, forgotten_command_line_options(:without => "emo test")
expect(out).to include(bundle_show_message)
expect(out).to include("Gems in the groups emo and test were not installed")
expect(out).to include(bundle_complete_message)
expect(out).to include("4 Gemfile dependencies, 3 gems now installed.")
end

it "with --without more groups" do
bundle! :install, forgotten_command_line_options(:without => "emo obama test")
expect(out).to include(bundle_show_message)
expect(out).to include("Gems in the groups emo, obama and test were not installed")
expect(out).to include(bundle_complete_message)
expect(out).to include("4 Gemfile dependencies, 2 gems now installed.")
end

describe "with --path and" do
describe "with `path` configured" do
let(:bundle_path) { "./vendor" }

it "without any options" do
it "shows proper messages according to the configured groups" do
bundle! :install, forgotten_command_line_options(:path => "vendor")
expect(out).to include(bundle_show_path_message)
expect(out).to_not include("Gems in the group")
expect(out).to include(bundle_complete_message)
end

it "with --without one group" do
bundle! :install, forgotten_command_line_options(:without => "emo", :path => "vendor")
expect(out).to include(bundle_show_path_message)
expect(out).to include("Gems in the group emo were not installed")
expect(out).to include(bundle_complete_message)
end

it "with --without two groups" do
bundle! :install, forgotten_command_line_options(:without => "emo test", :path => "vendor")
expect(out).to include(bundle_show_path_message)
expect(out).to include("Gems in the groups emo and test were not installed")
expect(out).to include(bundle_complete_message)
end

it "with --without more groups" do
bundle! :install, forgotten_command_line_options(:without => "emo obama test", :path => "vendor")
expect(out).to include(bundle_show_path_message)
expect(out).to include("Gems in the groups emo, obama and test were not installed")
expect(out).to include(bundle_complete_message)
end
end

it "with an absolute --path inside the cwd" do
describe "with an absolute `path` inside the cwd configured" do
it "shows proper messages according to the configured groups" do
bundle! :install, forgotten_command_line_options(:path => bundled_app("cache"))
expect(out).to include("Bundled gems are installed into `./cache`")
expect(out).to_not include("Gems in the group")
expect(out).to include(bundle_complete_message)
end
end

it "with an absolute --path outside the cwd" do
describe "with `path` configured to an absolute path outside the cwd" do
it "shows proper messages according to the configured groups" do
bundle! :install, forgotten_command_line_options(:path => tmp("not_bundled_app"))
expect(out).to include("Bundled gems are installed into `#{tmp("not_bundled_app")}`")
expect(out).to_not include("Gems in the group")
Expand Down Expand Up @@ -180,27 +172,21 @@
end

describe "for bundle update" do
it "without any options" do
it "shows proper messages according to the configured groups" do
bundle! :update, :all => true
expect(out).not_to include("Gems in the groups")
expect(out).to include(bundle_updated_message)
end

it "with --without one group" do
bundle! :install, forgotten_command_line_options(:without => "emo")
bundle! :update, :all => true
expect(out).to include("Gems in the group emo were not updated")
expect(out).to include(bundle_updated_message)
end

it "with --without two groups" do
bundle! :install, forgotten_command_line_options(:without => "emo test")
bundle! :update, :all => true
expect(out).to include("Gems in the groups emo and test were not updated")
expect(out).to include(bundle_updated_message)
end

it "with --without more groups" do
bundle! :install, forgotten_command_line_options(:without => "emo obama test")
bundle! :update, :all => true
expect(out).to include("Gems in the groups emo, obama and test were not updated")
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/install/deploy_spec.rb
Expand Up @@ -279,7 +279,7 @@
expect(err).not_to include("You have changed in the Gemfile")
end

it "installs gems by default to vendor/bundle when `--deployment` is set via an environment variable", :bundler => "< 3" do
it "installs gems by default to vendor/bundle when deployment mode is set via an environment variable", :bundler => "< 3" do
ENV["BUNDLE_DEPLOYMENT"] = "true"
bundle "install"
expect(out).to include("vendor/bundle")
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/install/gemfile/eval_gemfile_spec.rb
Expand Up @@ -45,7 +45,7 @@

# Make sure that we are properly comparing path based gems between the
# parsed lockfile and the evaluated gemfile.
it "bundles with --deployment" do
it "bundles with deployment mode configured" do
bundle! :install
bundle! :install, forgotten_command_line_options(:deployment => true)
end
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/install/gemfile/gemspec_spec.rb
Expand Up @@ -555,7 +555,7 @@
expect(the_bundle).to include_gems "foo 1.0.0", "rack 1.0.0"
end

it "installs the ruby platform gemspec and skips dev deps with --without development" do
it "installs the ruby platform gemspec and skips dev deps with `without development` configured" do
simulate_platform "ruby"

install_gemfile! <<-G, forgotten_command_line_options(:without => "development")
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/install/gemfile/git_spec.rb
Expand Up @@ -1032,7 +1032,7 @@
end
end

describe "bundle install --deployment with git sources" do
describe "bundle install with deployment mode configured and git sources" do
it "works" do
build_git "valim", :path => lib_path("valim")

Expand Down
6 changes: 3 additions & 3 deletions bundler/spec/install/gems/standalone_spec.rb
Expand Up @@ -178,7 +178,7 @@
expect(err).to eq("ZOMG LOAD ERROR")
end

it "allows --without to limit the groups used in a standalone" do
it "allows `without` configuration to limit the groups used in a standalone" do
bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle"), :without => "test").merge(:standalone => true, :dir => cwd)

load_error_ruby <<-RUBY, "spec"
Expand All @@ -194,7 +194,7 @@
expect(err).to eq("ZOMG LOAD ERROR")
end

it "allows --path to change the location of the standalone bundle" do
it "allows `path` configuration to change the location of the standalone bundle" do
bundle! "install", forgotten_command_line_options(:path => "path/to/bundle").merge(:standalone => true, :dir => cwd)

ruby <<-RUBY
Expand All @@ -208,7 +208,7 @@
expect(out).to eq("2.3.2")
end

it "allows remembered --without to limit the groups used in a standalone" do
it "allows `without` to limit the groups used in a standalone" do
bundle! :install, forgotten_command_line_options(:without => "test").merge(:dir => cwd)
bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :dir => cwd)

Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/plugins/source/example_spec.rb
Expand Up @@ -155,7 +155,7 @@ def install(spec, opts)
expect(the_bundle).to include_gems("a-path-gem 1.0")
end

it "copies repository to vendor cache and uses it even when installed with bundle --path" do
it "copies repository to vendor cache and uses it even when installed with `path` configured" do
bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
bundle "config set cache_all true"
bundle! :cache
Expand Down

0 comments on commit f878a81

Please sign in to comment.