diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-11-01 21:49:41 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-11-01 22:02:59 +0900 |
commit | 09bfdfa31ad5ae34d29745344493f6a63d355804 (patch) | |
tree | 9c533bb34d9fa5ea818c13e9422efee9757e1b9d /spec/commands | |
parent | 6d2c0d2a199564a75612eb492adec5e27eaa923d (diff) | |
download | bundler-09bfdfa31ad5ae34d29745344493f6a63d355804.tar.gz |
Backport from ruby core
Diffstat (limited to 'spec/commands')
-rw-r--r-- | spec/commands/binstubs_spec.rb | 4 | ||||
-rw-r--r-- | spec/commands/clean_spec.rb | 2 | ||||
-rw-r--r-- | spec/commands/exec_spec.rb | 22 | ||||
-rw-r--r-- | spec/commands/help_spec.rb | 16 | ||||
-rw-r--r-- | spec/commands/pristine_spec.rb | 2 |
5 files changed, 23 insertions, 23 deletions
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index 09371572eb..2f014f2631 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -192,7 +192,7 @@ RSpec.describe "bundle binstubs <gem>" do end end - context "using another binstub", :ruby_repo do + context "using another binstub" do let(:system_bundler_version) { :bundler } it "loads all gems" do sys_exec! bundled_app("bin/print_loaded_gems").to_s @@ -202,7 +202,7 @@ RSpec.describe "bundle binstubs <gem>" do context "when requesting a different bundler version" do before { lockfile lockfile.gsub(Bundler::VERSION, "999.999.999") } - it "attempts to load that version" do + it "attempts to load that version", :ruby_repo do sys_exec bundled_app("bin/rackup").to_s expect(exitstatus).to eq(42) if exitstatus expect(last_command.stderr).to include("Activating bundler (999.999.999) failed:"). diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb index 00fa40f92e..37cbeeb4e7 100644 --- a/spec/commands/clean_spec.rb +++ b/spec/commands/clean_spec.rb @@ -734,7 +734,7 @@ RSpec.describe "bundle clean" do expect(vendored_gems("bundler/gems/very_simple_git_binary-1.0-#{revision[0..11]}")).to exist end - it "removes extension directories", :rubygems => "2.2" do + it "removes extension directories", :ruby_repo, :rubygems => "2.2" do gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 490bedacf0..fdf60cefe7 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -178,7 +178,7 @@ RSpec.describe "bundle exec" do expect(out).to have_rubyopts(rubyopt) end - it "does not duplicate already exec'ed RUBYLIB", :ruby_repo do + it "does not duplicate already exec'ed RUBYLIB" do install_gemfile <<-G gem "rack" G @@ -303,35 +303,35 @@ RSpec.describe "bundle exec" do expect(out).to eq('args: ["-h"]') end - it "shows bundle-exec's man page when --help is between exec and the executable", :ruby_repo do + it "shows bundle-exec's man page when --help is between exec and the executable" do with_fake_man do bundle "#{exec} --help cat" end expect(out).to include(%(["#{root}/man/bundle-exec.1"])) end - it "shows bundle-exec's man page when --help is before exec", :ruby_repo do + it "shows bundle-exec's man page when --help is before exec" do with_fake_man do bundle "--help #{exec}" end expect(out).to include(%(["#{root}/man/bundle-exec.1"])) end - it "shows bundle-exec's man page when -h is before exec", :ruby_repo do + it "shows bundle-exec's man page when -h is before exec" do with_fake_man do bundle "-h #{exec}" end expect(out).to include(%(["#{root}/man/bundle-exec.1"])) end - it "shows bundle-exec's man page when --help is after exec", :ruby_repo do + it "shows bundle-exec's man page when --help is after exec" do with_fake_man do bundle "#{exec} --help" end expect(out).to include(%(["#{root}/man/bundle-exec.1"])) end - it "shows bundle-exec's man page when -h is after exec", :ruby_repo do + it "shows bundle-exec's man page when -h is after exec" do with_fake_man do bundle "#{exec} -h" end @@ -342,20 +342,20 @@ RSpec.describe "bundle exec" do end describe "with gem executables" do - describe "run from a random directory" do + describe "run from a random directory", :ruby_repo do before(:each) do install_gemfile <<-G gem "rack" G end - it "works when unlocked", :ruby_repo do + it "works when unlocked" do bundle "exec 'cd #{tmp("gems")} && rackup'", :env => { :RUBYOPT => "-r#{spec_dir.join("support/hax")}" } expect(out).to eq("1.0.0") expect(out).to include("1.0.0") end - it "works when locked", :ruby_repo do + it "works when locked" do expect(the_bundle).to be_locked bundle "exec 'cd #{tmp("gems")} && rackup'", :env => { :RUBYOPT => "-r#{spec_dir.join("support/hax")}" } expect(out).to include("1.0.0") @@ -445,7 +445,7 @@ RSpec.describe "bundle exec" do expect(out).to include("Installing foo 1.0") end - describe "with gems bundled via :path with invalid gemspecs" do + describe "with gems bundled via :path with invalid gemspecs", :ruby_repo do it "outputs the gemspec validation errors", :rubygems => ">= 1.7.2" do build_lib "foo" @@ -785,7 +785,7 @@ __FILE__: #{path.to_s.inspect} end end - context "nested bundle exec", :ruby_repo do + context "nested bundle exec" do let(:system_gems_to_install) { super() << :bundler } context "with shared gems disabled" do diff --git a/spec/commands/help_spec.rb b/spec/commands/help_spec.rb index cd6f13756c..56b1b6f722 100644 --- a/spec/commands/help_spec.rb +++ b/spec/commands/help_spec.rb @@ -10,21 +10,21 @@ RSpec.describe "bundle help" do expect(err).to include("running `gem cleanup bundler`.") end - it "uses mann when available", :ruby_repo do + it "uses mann when available" do with_fake_man do bundle "help gemfile" end expect(out).to eq(%(["#{root}/man/gemfile.5"])) end - it "prefixes bundle commands with bundle- when finding the groff files", :ruby_repo do + it "prefixes bundle commands with bundle- when finding the groff files" do with_fake_man do bundle "help install" end expect(out).to eq(%(["#{root}/man/bundle-install.1"])) end - it "simply outputs the txt file when there is no man on the path", :ruby_repo do + it "simply outputs the txt file when there is no man on the path" do with_path_as("") do bundle "help install" end @@ -49,28 +49,28 @@ RSpec.describe "bundle help" do expect(out).to eq("--help") end - it "is called when the --help flag is used after the command", :ruby_repo do + it "is called when the --help flag is used after the command" do with_fake_man do bundle "install --help" end expect(out).to eq(%(["#{root}/man/bundle-install.1"])) end - it "is called when the --help flag is used before the command", :ruby_repo do + it "is called when the --help flag is used before the command" do with_fake_man do bundle "--help install" end expect(out).to eq(%(["#{root}/man/bundle-install.1"])) end - it "is called when the -h flag is used before the command", :ruby_repo do + it "is called when the -h flag is used before the command" do with_fake_man do bundle "-h install" end expect(out).to eq(%(["#{root}/man/bundle-install.1"])) end - it "is called when the -h flag is used after the command", :ruby_repo do + it "is called when the -h flag is used after the command" do with_fake_man do bundle "install -h" end @@ -84,7 +84,7 @@ RSpec.describe "bundle help" do expect(out).to include('Could not find command "instill".') end - it "is called when only using the --help flag", :ruby_repo do + it "is called when only using the --help flag" do with_fake_man do bundle "--help" end diff --git a/spec/commands/pristine_spec.rb b/spec/commands/pristine_spec.rb index da6bb1c093..76848c5e44 100644 --- a/spec/commands/pristine_spec.rb +++ b/spec/commands/pristine_spec.rb @@ -42,7 +42,7 @@ RSpec.describe "bundle pristine", :ruby_repo do expect(changes_txt).to_not be_file end - it "does not delete the bundler gem", :ruby_repo do + it "does not delete the bundler gem" do ENV["BUNDLER_SPEC_KEEP_DEFAULT_BUNDLER_GEM"] = "true" system_gems :bundler bundle! "install" |