diff options
| author | Samuel E. Giddins <segiddins@segiddins.me> | 2015-07-15 20:52:48 -0700 |
|---|---|---|
| committer | Samuel E. Giddins <segiddins@segiddins.me> | 2015-07-15 20:52:48 -0700 |
| commit | a77ca278809d7f31fa51e4b821faed86324c8275 (patch) | |
| tree | da1c6c68b24fdcab9acfc07b6a352a39af1c6f4e /spec/update | |
| parent | af694073229af89af205d24ff449f51f74316a37 (diff) | |
| download | bundler-a77ca278809d7f31fa51e4b821faed86324c8275.tar.gz | |
[RuboCop] Enable Style/StringLiterals
Diffstat (limited to 'spec/update')
| -rw-r--r-- | spec/update/git_spec.rb | 52 | ||||
| -rw-r--r-- | spec/update/path_spec.rb | 4 |
2 files changed, 28 insertions, 28 deletions
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb index bc122e2907..5743501032 100644 --- a/spec/update/git_spec.rb +++ b/spec/update/git_spec.rb @@ -7,7 +7,7 @@ describe "bundle update" do update_git "foo", :branch => "omg" install_gemfile <<-G - git "#{lib_path('foo-1.0')}", :branch => "omg" do + git "#{lib_path("foo-1.0")}", :branch => "omg" do gem 'foo' end G @@ -28,11 +28,11 @@ describe "bundle update" do end install_gemfile <<-G - gem "rails", :git => "#{lib_path('rails')}" + gem "rails", :git => "#{lib_path("rails")}" G bundle "update rails" - expect(out).to include("Using activesupport 3.0 from #{lib_path('rails')} (at master)") + expect(out).to include("Using activesupport 3.0 from #{lib_path("rails")} (at master)") should_be_installed "rails 3.0", "activesupport 3.0" end @@ -41,7 +41,7 @@ describe "bundle update" do update_git "foo", :branch => "omg", :path => lib_path("foo") install_gemfile <<-G - git "#{lib_path('foo')}", :branch => "omg" do + git "#{lib_path("foo")}", :branch => "omg" do gem 'foo' end G @@ -56,17 +56,17 @@ describe "bundle update" do end it "floats on master when updating all gems that are pinned to the source even if you have child dependencies" do - build_git "foo", :path => lib_path('foo') + build_git "foo", :path => lib_path("foo") build_gem "bar", :to_system => true do |s| s.add_dependency "foo" end install_gemfile <<-G - gem "foo", :git => "#{lib_path('foo')}" + gem "foo", :git => "#{lib_path("foo")}" gem "bar" G - update_git "foo", :path => lib_path('foo') do |s| + update_git "foo", :path => lib_path("foo") do |s| s.write "lib/foo.rb", "FOO = '1.1'" end @@ -80,13 +80,13 @@ describe "bundle update" do build_git "foo", :path => lib_path("foo_two") install_gemfile <<-G - gem "foo", "1.0", :git => "#{lib_path('foo_one')}" + gem "foo", "1.0", :git => "#{lib_path("foo_one")}" G FileUtils.rm_rf lib_path("foo_one") install_gemfile <<-G - gem "foo", "1.0", :git => "#{lib_path('foo_two')}" + gem "foo", "1.0", :git => "#{lib_path("foo_two")}" G expect(err).to be_empty @@ -130,51 +130,51 @@ describe "bundle update" do s.add_dependency "submodule" end - Dir.chdir(lib_path('has_submodule-1.0')) do - `git submodule add #{lib_path('submodule-1.0')} submodule-1.0` + Dir.chdir(lib_path("has_submodule-1.0")) do + `git submodule add #{lib_path("submodule-1.0")} submodule-1.0` `git commit -m "submodulator"` end end it "it unlocks the source when submodules are added to a git source" do install_gemfile <<-G - git "#{lib_path('has_submodule-1.0')}" do + git "#{lib_path("has_submodule-1.0")}" do gem "has_submodule" end G run "require 'submodule'" - expect(out).to eq('GEM') + expect(out).to eq("GEM") install_gemfile <<-G - git "#{lib_path('has_submodule-1.0')}", :submodules => true do + git "#{lib_path("has_submodule-1.0")}", :submodules => true do gem "has_submodule" end G run "require 'submodule'" - expect(out).to eq('GIT') + expect(out).to eq("GIT") end it "it unlocks the source when submodules are removed from git source" do pending "This would require actually removing the submodule from the clone" install_gemfile <<-G - git "#{lib_path('has_submodule-1.0')}", :submodules => true do + git "#{lib_path("has_submodule-1.0")}", :submodules => true do gem "has_submodule" end G run "require 'submodule'" - expect(out).to eq('GIT') + expect(out).to eq("GIT") install_gemfile <<-G - git "#{lib_path('has_submodule-1.0')}" do + git "#{lib_path("has_submodule-1.0")}" do gem "has_submodule" end G run "require 'submodule'" - expect(out).to eq('GEM') + expect(out).to eq("GEM") end end @@ -182,7 +182,7 @@ describe "bundle update" do build_git "foo", "1.0" install_gemfile <<-G - gem "foo", :git => "#{lib_path('foo-1.0')}" + gem "foo", :git => "#{lib_path("foo-1.0")}" G lib_path("foo-1.0").join(".git").rmtree @@ -194,16 +194,16 @@ describe "bundle update" do it "should not explode on invalid revision on update of gem by name" do build_git "rack", "0.8" - build_git "rack", "0.8", :path => lib_path('local-rack') do |s| + build_git "rack", "0.8", :path => lib_path("local-rack") do |s| s.write "lib/rack.rb", "puts :LOCAL" end install_gemfile <<-G source "file://#{gem_repo1}" - gem "rack", :git => "#{lib_path('rack-0.8')}", :branch => "master" + gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master" G - bundle %|config local.rack #{lib_path('local-rack')}| + bundle %|config local.rack #{lib_path("local-rack")}| bundle "update rack" expect(out).to include("Bundle updated!") end @@ -212,7 +212,7 @@ describe "bundle update" do build_git "rails", "3.0", :path => lib_path("rails") install_gemfile <<-G - gem "rails", :git => "#{lib_path('rails')}" + gem "rails", :git => "#{lib_path("rails")}" G lockfile <<-G @@ -229,7 +229,7 @@ describe "bundle update" do G bundle "update" - expect(out).to include("Using rails 3.0 (was 2.3.2) from #{lib_path('rails')} (at master)") + expect(out).to include("Using rails 3.0 (was 2.3.2) from #{lib_path("rails")} (at master)") end end @@ -242,7 +242,7 @@ describe "bundle update" do install_gemfile <<-G source "file://#{gem_repo2}" - git "#{lib_path('foo')}" do + git "#{lib_path("foo")}" do gem 'foo' end gem 'rack' diff --git a/spec/update/path_spec.rb b/spec/update/path_spec.rb index fdc4615b8a..ff09cd7fa6 100644 --- a/spec/update/path_spec.rb +++ b/spec/update/path_spec.rb @@ -6,13 +6,13 @@ describe "path sources" do build_lib "activesupport", "2.3.5", :path => lib_path("rails/activesupport") install_gemfile <<-G - gem "activesupport", :path => "#{lib_path('rails/activesupport')}" + gem "activesupport", :path => "#{lib_path("rails/activesupport")}" G build_lib "activesupport", "3.0", :path => lib_path("rails/activesupport") bundle "update --source activesupport" - expect(out).to include("Using activesupport 3.0 (was 2.3.5) from source at #{lib_path('rails/activesupport')}") + expect(out).to include("Using activesupport 3.0 (was 2.3.5) from source at #{lib_path("rails/activesupport")}") end end end |
