diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-05-29 12:27:15 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-05 07:32:42 +0900 |
commit | 61b61f426a796871c27a0a9e4eedb31057864165 (patch) | |
tree | bba186eac9ea7a6fc84349368904e13a7179edd8 | |
parent | f02f19d62f70bc3b38ff9f2902f99e3bfefefa23 (diff) |
[rubygems/rubygems] Reword specs to not mention deprecated flags
https://github.com/rubygems/rubygems/commit/f878a81f22
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
-rw-r--r-- | spec/bundler/commands/cache_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/commands/post_bundle_message_spec.rb | 34 | ||||
-rw-r--r-- | spec/bundler/install/deploy_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/gemfile/eval_gemfile_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/gemfile/gemspec_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/gemfile/git_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/gems/standalone_spec.rb | 6 | ||||
-rw-r--r-- | spec/bundler/plugins/source/example_spec.rb | 2 |
8 files changed, 19 insertions, 33 deletions
diff --git a/spec/bundler/commands/cache_spec.rb b/spec/bundler/commands/cache_spec.rb index 31b3837d31..09a1b8437a 100644 --- a/spec/bundler/commands/cache_spec.rb +++ b/spec/bundler/commands/cache_spec.rb @@ -242,7 +242,7 @@ RSpec.describe "bundle cache" do end end - context "with --frozen" do + context "with frozen configured" do before do gemfile <<-G source "#{file_uri_for(gem_repo1)}" diff --git a/spec/bundler/commands/post_bundle_message_spec.rb b/spec/bundler/commands/post_bundle_message_spec.rb index 6fd4fb7089..bcbf367029 100644 --- a/spec/bundler/commands/post_bundle_message_spec.rb +++ b/spec/bundler/commands/post_bundle_message_spec.rb @@ -22,31 +22,25 @@ RSpec.describe "post bundle message" do 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") @@ -54,45 +48,43 @@ RSpec.describe "post bundle message" do 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") @@ -180,27 +172,21 @@ The source does not contain any versions of 'not-a-gem' 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") diff --git a/spec/bundler/install/deploy_spec.rb b/spec/bundler/install/deploy_spec.rb index 9a5c50569c..b7ece9460b 100644 --- a/spec/bundler/install/deploy_spec.rb +++ b/spec/bundler/install/deploy_spec.rb @@ -279,7 +279,7 @@ RSpec.describe "install with --deployment or --frozen" do 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") diff --git a/spec/bundler/install/gemfile/eval_gemfile_spec.rb b/spec/bundler/install/gemfile/eval_gemfile_spec.rb index 69341250c3..44cf052895 100644 --- a/spec/bundler/install/gemfile/eval_gemfile_spec.rb +++ b/spec/bundler/install/gemfile/eval_gemfile_spec.rb @@ -45,7 +45,7 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do # 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 diff --git a/spec/bundler/install/gemfile/gemspec_spec.rb b/spec/bundler/install/gemfile/gemspec_spec.rb index 1c1924cc2a..2ccbc1f3cc 100644 --- a/spec/bundler/install/gemfile/gemspec_spec.rb +++ b/spec/bundler/install/gemfile/gemspec_spec.rb @@ -555,7 +555,7 @@ RSpec.describe "bundle install from an existing gemspec" do 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") diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index fd5cde4fb1..d495ca2395 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -1032,7 +1032,7 @@ RSpec.describe "bundle install with git sources" do 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") diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb index 6e4074fb9f..c45ecd52ec 100644 --- a/spec/bundler/install/gems/standalone_spec.rb +++ b/spec/bundler/install/gems/standalone_spec.rb @@ -178,7 +178,7 @@ RSpec.shared_examples "bundle install --standalone" do 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" @@ -194,7 +194,7 @@ RSpec.shared_examples "bundle install --standalone" do 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 @@ -208,7 +208,7 @@ RSpec.shared_examples "bundle install --standalone" do 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) diff --git a/spec/bundler/plugins/source/example_spec.rb b/spec/bundler/plugins/source/example_spec.rb index aac506dc9a..208f612099 100644 --- a/spec/bundler/plugins/source/example_spec.rb +++ b/spec/bundler/plugins/source/example_spec.rb @@ -155,7 +155,7 @@ RSpec.describe "real source plugins" do 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 |