summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_install_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_commands_install_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb262
1 files changed, 131 insertions, 131 deletions
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index 6127fcc124..7a58bcd7cb 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require_relative 'helper'
-require 'rubygems/commands/install_command'
-require 'rubygems/request_set'
-require 'rubygems/rdoc'
+require_relative "helper"
+require "rubygems/commands/install_command"
+require "rubygems/request_set"
+require "rubygems/rdoc"
class TestGemCommandsInstallCommand < Gem::TestCase
def setup
@@ -30,8 +30,8 @@ class TestGemCommandsInstallCommand < Gem::TestCase
def test_execute_exclude_prerelease
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.gem 'a', '2.pre'
+ fetcher.gem "a", 2
+ fetcher.gem "a", "2.pre"
end
@cmd.options[:args] = %w[a]
@@ -47,13 +47,13 @@ class TestGemCommandsInstallCommand < Gem::TestCase
def test_execute_explicit_version_includes_prerelease
specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.gem 'a', '2.a'
+ fetcher.gem "a", 2
+ fetcher.gem "a", "2.a"
end
- a2_pre = specs['a-2.a']
+ a2_pre = specs["a-2.a"]
- @cmd.handle_options [a2_pre.name, '--version', a2_pre.version.to_s,
+ @cmd.handle_options [a2_pre.name, "--version", a2_pre.version.to_s,
"--no-document"]
assert @cmd.options[:prerelease]
assert @cmd.options[:version].satisfied_by?(a2_pre.version)
@@ -69,12 +69,12 @@ class TestGemCommandsInstallCommand < Gem::TestCase
def test_execute_local
specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
@cmd.options[:domain] = :local
- FileUtils.mv specs['a-2'].cache_file, @tempdir
+ FileUtils.mv specs["a-2"].cache_file, @tempdir
@cmd.options[:args] = %w[a]
@@ -97,14 +97,14 @@ class TestGemCommandsInstallCommand < Gem::TestCase
def test_execute_local_dependency_nonexistent
specs = spec_fetcher do |fetcher|
- fetcher.gem 'foo', 2, 'bar' => '0.5'
+ fetcher.gem "foo", 2, "bar" => "0.5"
end
@cmd.options[:domain] = :local
- FileUtils.mv specs['foo-2'].cache_file, @tempdir
+ FileUtils.mv specs["foo-2"].cache_file, @tempdir
- @cmd.options[:args] = ['foo']
+ @cmd.options[:args] = ["foo"]
use_ui @ui do
orig_dir = Dir.pwd
@@ -128,15 +128,15 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
def test_execute_local_dependency_nonexistent_ignore_dependencies
specs = spec_fetcher do |fetcher|
- fetcher.gem 'foo', 2, 'bar' => '0.5'
+ fetcher.gem "foo", 2, "bar" => "0.5"
end
@cmd.options[:domain] = :local
@cmd.options[:ignore_dependencies] = true
- FileUtils.mv specs['foo-2'].cache_file, @tempdir
+ FileUtils.mv specs["foo-2"].cache_file, @tempdir
- @cmd.options[:args] = ['foo']
+ @cmd.options[:args] = ["foo"]
use_ui @ui do
orig_dir = Dir.pwd
@@ -155,16 +155,16 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
def test_execute_local_transitive_prerelease
specs = spec_fetcher do |fetcher|
- fetcher.download 'a', 2, 'b' => "2.a", 'c' => '3'
- fetcher.download 'b', '2.a'
- fetcher.download 'c', '3'
+ fetcher.download "a", 2, "b" => "2.a", "c" => "3"
+ fetcher.download "b", "2.a"
+ fetcher.download "c", "3"
end
@cmd.options[:domain] = :local
- FileUtils.mv specs['a-2'].cache_file, @tempdir
- FileUtils.mv specs['b-2.a'].cache_file, @tempdir
- FileUtils.mv specs['c-3'].cache_file, @tempdir
+ FileUtils.mv specs["a-2"].cache_file, @tempdir
+ FileUtils.mv specs["b-2.a"].cache_file, @tempdir
+ FileUtils.mv specs["c-3"].cache_file, @tempdir
@cmd.options[:args] = %w[a]
@@ -187,16 +187,16 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
end
def test_execute_no_user_install
- pend 'skipped on MS Windows (chmod has no effect)' if win_platform?
- pend 'skipped in root privilege' if Process.uid.zero?
+ pend "skipped on MS Windows (chmod has no effect)" if win_platform?
+ pend "skipped in root privilege" if Process.uid.zero?
specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
@cmd.options[:user_install] = false
- FileUtils.mv specs['a-2'].cache_file, @tempdir
+ FileUtils.mv specs["a-2"].cache_file, @tempdir
@cmd.options[:args] = %w[a]
@@ -295,10 +295,10 @@ ERROR: Could not find a valid gem 'bar' (= 0.5) (required by 'foo' (>= 0)) in a
def test_execute_dependency_nonexistent
spec_fetcher do |fetcher|
- fetcher.spec 'foo', 2, 'bar' => '0.5'
+ fetcher.spec "foo", 2, "bar" => "0.5"
end
- @cmd.options[:args] = ['foo']
+ @cmd.options[:args] = ["foo"]
use_ui @ui do
e = assert_raise Gem::MockGemUi::TermError do
@@ -451,8 +451,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_prerelease_skipped_when_no_flag_set
spec_fetcher do |fetcher|
- fetcher.gem 'a', 1
- fetcher.gem 'a', '3.a'
+ fetcher.gem "a", 1
+ fetcher.gem "a", "3.a"
end
@cmd.options[:prerelease] = false
@@ -469,8 +469,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_prerelease_wins_over_previous_ver
spec_fetcher do |fetcher|
- fetcher.download 'a', 1
- fetcher.download 'a', '2.a'
+ fetcher.download "a", 1
+ fetcher.download "a", "2.a"
end
@cmd.options[:prerelease] = true
@@ -487,8 +487,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_with_version_specified_by_colon
spec_fetcher do |fetcher|
- fetcher.download 'a', 1
- fetcher.download 'a', 2
+ fetcher.download "a", 1
+ fetcher.download "a", 2
end
@cmd.options[:args] = %w[a:1]
@@ -504,8 +504,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_prerelease_skipped_when_non_pre_available
spec_fetcher do |fetcher|
- fetcher.gem 'a', '2.pre'
- fetcher.gem 'a', 2
+ fetcher.gem "a", "2.pre"
+ fetcher.gem "a", 2
end
@cmd.options[:prerelease] = true
@@ -525,15 +525,15 @@ ERROR: Possible alternatives: non_existent_with_hint
local = Gem::Platform.local
spec_fetcher do |fetcher|
- fetcher.download 'a', 2
- fetcher.download 'a', 2 do |s|
+ fetcher.download "a", 2
+ fetcher.download "a", 2 do |s|
s.required_ruby_version = "< #{RUBY_VERSION}.a"
s.platform = local
end
- fetcher.download 'a', 3 do |s|
+ fetcher.download "a", 3 do |s|
s.required_ruby_version = ">= #{next_ruby}"
end
- fetcher.download 'a', 3 do |s|
+ fetcher.download "a", 3 do |s|
s.required_ruby_version = ">= #{next_ruby}"
s.platform = local
end
@@ -553,8 +553,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_required_ruby_version_upper_bound
local = Gem::Platform.local
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2.0
- fetcher.gem 'a', 2.0 do |s|
+ fetcher.gem "a", 2.0
+ fetcher.gem "a", 2.0 do |s|
s.required_ruby_version = "< #{RUBY_VERSION}.a"
s.platform = local
end
@@ -573,8 +573,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_required_ruby_version_specific_not_met
spec_fetcher do |fetcher|
- fetcher.gem 'a', '1.0' do |s|
- s.required_ruby_version = '= 1.4.6'
+ fetcher.gem "a", "1.0" do |s|
+ s.required_ruby_version = "= 1.4.6"
end
end
@@ -593,8 +593,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_required_ruby_version_specific_prerelease_met
spec_fetcher do |fetcher|
- fetcher.gem 'a', '1.0' do |s|
- s.required_ruby_version = '>= 1.4.6.preview2'
+ fetcher.gem "a", "1.0" do |s|
+ s.required_ruby_version = ">= 1.4.6.preview2"
end
end
@@ -613,7 +613,7 @@ ERROR: Possible alternatives: non_existent_with_hint
next_ruby_pre = Gem.ruby_version.segments.map.with_index {|n, i| i == 1 ? n + 1 : n }.join(".") + ".a"
spec_fetcher do |fetcher|
- fetcher.gem 'a', '1.0' do |s|
+ fetcher.gem "a", "1.0" do |s|
s.required_ruby_version = "> #{next_ruby_pre}"
end
end
@@ -633,8 +633,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_required_rubygems_version_wrong
spec_fetcher do |fetcher|
- fetcher.gem 'a', '1.0' do |s|
- s.required_rubygems_version = '< 0'
+ fetcher.gem "a", "1.0" do |s|
+ s.required_rubygems_version = "< 0"
end
end
@@ -653,7 +653,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_rdoc
specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
Gem.done_installing(&Gem::RDoc.method(:generation_hook))
@@ -661,7 +661,7 @@ ERROR: Possible alternatives: non_existent_with_hint
@cmd.options[:document] = %w[rdoc ri]
@cmd.options[:domain] = :local
- a2 = specs['a-2']
+ a2 = specs["a-2"]
FileUtils.mv a2.cache_file, @tempdir
@cmd.options[:args] = %w[a]
@@ -683,22 +683,22 @@ ERROR: Possible alternatives: non_existent_with_hint
wait_for_child_process_to_exit
- assert_path_exist File.join(a2.doc_dir, 'ri')
- assert_path_exist File.join(a2.doc_dir, 'rdoc')
+ assert_path_exist File.join(a2.doc_dir, "ri")
+ assert_path_exist File.join(a2.doc_dir, "rdoc")
end
def test_execute_rdoc_with_path
specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
Gem.done_installing(&Gem::RDoc.method(:generation_hook))
@cmd.options[:document] = %w[rdoc ri]
@cmd.options[:domain] = :local
- @cmd.options[:install_dir] = 'whatever'
+ @cmd.options[:install_dir] = "whatever"
- a2 = specs['a-2']
+ a2 = specs["a-2"]
FileUtils.mv a2.cache_file, @tempdir
@cmd.options[:args] = %w[a]
@@ -720,19 +720,19 @@ ERROR: Possible alternatives: non_existent_with_hint
wait_for_child_process_to_exit
- assert_path_exist 'whatever/doc/a-2', 'documentation not installed'
+ assert_path_exist "whatever/doc/a-2", "documentation not installed"
end
def test_execute_saves_build_args
specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
args = %w[--with-awesome=true --more-awesome=yes]
Gem::Command.build_args = args
- a2 = specs['a-2']
+ a2 = specs["a-2"]
FileUtils.mv a2.cache_file, @tempdir
@cmd.options[:domain] = :local
@@ -762,7 +762,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_remote
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
@cmd.options[:args] = %w[a]
@@ -782,7 +782,7 @@ ERROR: Possible alternatives: non_existent_with_hint
FileUtils.touch("a.gem")
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
@cmd.options[:args] = %w[a]
@@ -800,7 +800,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_remote_truncates_existing_gemspecs
spec_fetcher do |fetcher|
- fetcher.gem 'a', 1
+ fetcher.gem "a", 1
end
@cmd.options[:domain] = :remote
@@ -816,7 +816,7 @@ ERROR: Possible alternatives: non_existent_with_hint
assert_equal %w[a-1], @cmd.installed_specs.map {|spec| spec.full_name }
assert_match "1 gem installed", @ui.output
- a1_gemspec = File.join(@gemhome, 'specifications', "a-1.gemspec")
+ a1_gemspec = File.join(@gemhome, "specifications", "a-1.gemspec")
initial_a1_gemspec_content = File.read(a1_gemspec)
modified_a1_gemspec_content = initial_a1_gemspec_content + "\n # AAAAAAA\n"
@@ -833,14 +833,14 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_remote_ignores_files
specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 1
- fetcher.gem 'a', 2
+ fetcher.gem "a", 1
+ fetcher.gem "a", 2
end
@cmd.options[:domain] = :remote
- a1 = specs['a-1']
- a2 = specs['a-2']
+ a1 = specs["a-1"]
+ a2 = specs["a-2"]
FileUtils.mv a2.cache_file, @tempdir
@@ -849,7 +849,7 @@ ERROR: Possible alternatives: non_existent_with_hint
@cmd.options[:args] = [a2.name]
- gemdir = File.join @gemhome, 'specifications'
+ gemdir = File.join @gemhome, "specifications"
a2_gemspec = File.join(gemdir, "a-2.gemspec")
a1_gemspec = File.join(gemdir, "a-1.gemspec")
@@ -878,12 +878,12 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_two
specs = spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.gem 'b', 2
+ fetcher.gem "a", 2
+ fetcher.gem "b", 2
end
- FileUtils.mv specs['a-2'].cache_file, @tempdir
- FileUtils.mv specs['b-2'].cache_file, @tempdir
+ FileUtils.mv specs["a-2"].cache_file, @tempdir
+ FileUtils.mv specs["b-2"].cache_file, @tempdir
@cmd.options[:domain] = :local
@@ -929,10 +929,10 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_two_version_specified_by_colon
spec_fetcher do |fetcher|
- fetcher.gem 'a', 1
- fetcher.gem 'a', 2
- fetcher.gem 'b', 1
- fetcher.gem 'b', 2
+ fetcher.gem "a", 1
+ fetcher.gem "a", 2
+ fetcher.gem "b", 1
+ fetcher.gem "b", 2
end
@cmd.options[:args] = %w[a:1 b:1]
@@ -948,9 +948,9 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_conservative
spec_fetcher do |fetcher|
- fetcher.download 'b', 2
+ fetcher.download "b", 2
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
@cmd.options[:conservative] = true
@@ -981,7 +981,7 @@ ERROR: Possible alternatives: non_existent_with_hint
done_installing = true
end
- spec = util_spec 'a', 2
+ spec = util_spec "a", 2
util_build_gem spec
@@ -989,21 +989,21 @@ ERROR: Possible alternatives: non_existent_with_hint
@cmd.options[:ignore_dependencies] = true
- @cmd.install_gem 'a', '>= 0'
+ @cmd.install_gem "a", ">= 0"
assert_equal %w[a-2], @cmd.installed_specs.map {|s| s.full_name }
- assert done_installing, 'documentation was not generated'
+ assert done_installing, "documentation was not generated"
end
def test_install_gem_ignore_dependencies_remote
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
@cmd.options[:ignore_dependencies] = true
- @cmd.install_gem 'a', '>= 0'
+ @cmd.install_gem "a", ">= 0"
assert_equal %w[a-2], @cmd.installed_specs.map {|spec| spec.full_name }
end
@@ -1011,22 +1011,22 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_install_gem_ignore_dependencies_remote_platform_local
local = Gem::Platform.local
spec_fetcher do |fetcher|
- fetcher.gem 'a', 3
+ fetcher.gem "a", 3
- fetcher.gem 'a', 3 do |s|
+ fetcher.gem "a", 3 do |s|
s.platform = local
end
end
@cmd.options[:ignore_dependencies] = true
- @cmd.install_gem 'a', '>= 0'
+ @cmd.install_gem "a", ">= 0"
assert_equal %W[a-3-#{local}], @cmd.installed_specs.map {|spec| spec.full_name }
end
def test_install_gem_ignore_dependencies_specific_file
- spec = util_spec 'a', 2
+ spec = util_spec "a", 2
util_build_gem spec
@@ -1041,8 +1041,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_parses_requirement_from_gemname
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
- fetcher.gem 'b', 2
+ fetcher.gem "a", 2
+ fetcher.gem "b", 2
end
@cmd.options[:domain] = :local
@@ -1088,12 +1088,12 @@ ERROR: Possible alternatives: non_existent_with_hint
assert_equal 2, e.exit_code
- assert_match 'Unable to download data', @ui.error
+ assert_match "Unable to download data", @ui.error
end
def test_show_source_problems_even_on_success
spec_fetcher do |fetcher|
- fetcher.download 'a', 2
+ fetcher.download "a", 2
end
Gem.sources << "http://nonexistent.example"
@@ -1118,7 +1118,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_redact_credentials_from_uri_on_warning
spec_fetcher do |fetcher|
- fetcher.download 'a', 2
+ fetcher.download "a", 2
end
Gem.sources << "http://username:SECURE_TOKEN@nonexistent.example"
@@ -1143,7 +1143,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_uses_from_a_gemdeps
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
File.open @gemdeps, "w" do |f|
@@ -1166,7 +1166,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_uses_from_a_gemdeps_with_no_lock
spec_fetcher do |fetcher|
- fetcher.gem 'a', 2
+ fetcher.gem "a", 2
end
File.open @gemdeps, "w" do |f|
@@ -1190,8 +1190,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_installs_from_a_gemdeps_with_conservative
spec_fetcher do |fetcher|
- fetcher.download 'a', 2
- fetcher.gem 'a', 1
+ fetcher.download "a", 2
+ fetcher.gem "a", 1
end
File.open @gemdeps, "w" do |f|
@@ -1214,7 +1214,7 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_installs_from_a_gemdeps
spec_fetcher do |fetcher|
- fetcher.download 'a', 2
+ fetcher.download "a", 2
end
File.open @gemdeps, "w" do |f|
@@ -1236,8 +1236,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_installs_deps_a_gemdeps
spec_fetcher do |fetcher|
- fetcher.download 'q', '1.0'
- fetcher.download 'r', '2.0', 'q' => nil
+ fetcher.download "q", "1.0"
+ fetcher.download "r", "2.0", "q" => nil
end
File.open @gemdeps, "w" do |f|
@@ -1262,9 +1262,9 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_uses_deps_a_gemdeps
spec_fetcher do |fetcher|
- fetcher.download 'r', '2.0', 'q' => nil
+ fetcher.download "r", "2.0", "q" => nil
- fetcher.spec 'q', '1.0'
+ fetcher.spec "q", "1.0"
end
File.open @gemdeps, "w" do |f|
@@ -1289,8 +1289,8 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_installs_deps_a_gemdeps_into_a_path
spec_fetcher do |fetcher|
- fetcher.download 'q', '1.0'
- fetcher.download 'r', '2.0', 'q' => nil
+ fetcher.download "q", "1.0"
+ fetcher.download "r", "2.0", "q" => nil
end
File.open @gemdeps, "w" do |f|
@@ -1319,11 +1319,11 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_with_gemdeps_path_ignores_system
specs = spec_fetcher do |fetcher|
- fetcher.download 'q', '1.0'
- fetcher.download 'r', '2.0', 'q' => nil
+ fetcher.download "q", "1.0"
+ fetcher.download "r", "2.0", "q" => nil
end
- install_specs specs['q-1.0']
+ install_specs specs["q-1.0"]
File.open @gemdeps, "w" do |f|
f << "gem 'r'"
@@ -1351,11 +1351,11 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_execute_uses_deps_a_gemdeps_with_a_path
specs = spec_fetcher do |fetcher|
- fetcher.gem 'q', '1.0'
- fetcher.gem 'r', '2.0', 'q' => nil
+ fetcher.gem "q", "1.0"
+ fetcher.gem "r", "2.0", "q" => nil
end
- i = Gem::Installer.at specs['q-1.0'].cache_file, :install_dir => "gf-path"
+ i = Gem::Installer.at specs["q-1.0"].cache_file, :install_dir => "gf-path"
i.install
assert File.file?("gf-path/specifications/q-1.0.gemspec"), "not installed"
@@ -1382,39 +1382,39 @@ ERROR: Possible alternatives: non_existent_with_hint
end
def test_handle_options_file
- FileUtils.touch 'Gemfile'
+ FileUtils.touch "Gemfile"
@cmd.handle_options %w[-g Gemfile]
- assert_equal 'Gemfile', @cmd.options[:gemdeps]
+ assert_equal "Gemfile", @cmd.options[:gemdeps]
- FileUtils.rm 'Gemfile'
+ FileUtils.rm "Gemfile"
- FileUtils.touch 'gem.deps.rb'
+ FileUtils.touch "gem.deps.rb"
@cmd.handle_options %w[--file gem.deps.rb]
- assert_equal 'gem.deps.rb', @cmd.options[:gemdeps]
+ assert_equal "gem.deps.rb", @cmd.options[:gemdeps]
- FileUtils.rm 'gem.deps.rb'
+ FileUtils.rm "gem.deps.rb"
- FileUtils.touch 'Isolate'
+ FileUtils.touch "Isolate"
@cmd.handle_options %w[-g]
- assert_equal 'Isolate', @cmd.options[:gemdeps]
+ assert_equal "Isolate", @cmd.options[:gemdeps]
- FileUtils.touch 'Gemfile'
+ FileUtils.touch "Gemfile"
@cmd.handle_options %w[-g]
- assert_equal 'Gemfile', @cmd.options[:gemdeps]
+ assert_equal "Gemfile", @cmd.options[:gemdeps]
- FileUtils.touch 'gem.deps.rb'
+ FileUtils.touch "gem.deps.rb"
@cmd.handle_options %w[-g]
- assert_equal 'gem.deps.rb', @cmd.options[:gemdeps]
+ assert_equal "gem.deps.rb", @cmd.options[:gemdeps]
end
def test_handle_options_suggest
@@ -1442,9 +1442,9 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_explain_platform_local
local = Gem::Platform.local
spec_fetcher do |fetcher|
- fetcher.spec 'a', 2
+ fetcher.spec "a", 2
- fetcher.spec 'a', 2 do |s|
+ fetcher.spec "a", 2 do |s|
s.platform = local
end
end
@@ -1468,9 +1468,9 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_explain_platform_local_ignore_dependencies
local = Gem::Platform.local
spec_fetcher do |fetcher|
- fetcher.spec 'a', 3
+ fetcher.spec "a", 3
- fetcher.spec 'a', 3 do |s|
+ fetcher.spec "a", 3 do |s|
s.platform = local
end
end
@@ -1495,9 +1495,9 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_explain_platform_ruby
local = Gem::Platform.local
spec_fetcher do |fetcher|
- fetcher.spec 'a', 2
+ fetcher.spec "a", 2
- fetcher.spec 'a', 2 do |s|
+ fetcher.spec "a", 2 do |s|
s.platform = local
end
end
@@ -1524,9 +1524,9 @@ ERROR: Possible alternatives: non_existent_with_hint
def test_explain_platform_ruby_ignore_dependencies
local = Gem::Platform.local
spec_fetcher do |fetcher|
- fetcher.spec 'a', 3
+ fetcher.spec "a", 3
- fetcher.spec 'a', 3 do |s|
+ fetcher.spec "a", 3 do |s|
s.platform = local
end
end