summaryrefslogtreecommitdiff
path: root/spec/bundler
diff options
context:
space:
mode:
authorUtkarsh Gupta <utkarsh@debian.org>2020-06-21 01:42:34 +0530
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-15 16:05:12 +0900
commitb28c6d04d0989fa01842435f617e96420a8b4743 (patch)
tree4cd20807304ff6852a6538ce15e63adae6d3fe11 /spec/bundler
parent449d24200b94ac5d849314125d2930e04d20ee6e (diff)
[rubygems/rubygems] Make Style/HashSyntax cop happy
Previously, we were using the old syntax like: `task :default => :spec`, but now this commit uses the new Ruby 1.9 hash syntax. Signed-off-by: Utkarsh Gupta <utkarsh@debian.org> https://github.com/rubygems/rubygems/commit/b41d0fdb56
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3275
Diffstat (limited to 'spec/bundler')
-rw-r--r--spec/bundler/commands/newgem_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index 91e33bd2b9..f0f55ae2d5 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -155,9 +155,10 @@ RSpec.describe "bundle gem" do
it "generates a gem skeleton with rubocop" do
gem_skeleton_assertions
expect(bundled_app("test-gem/Rakefile")).to read_as(
- include('require "rubocop/rake_task"').
+ include('# frozen_string_literal: true').
+ and(include('require "rubocop/rake_task"').
and(include("RuboCop::RakeTask.new").
- and(match(/:default.+:rubocop/)))
+ and(match(/default:.+:rubocop/))))
)
end
@@ -182,7 +183,6 @@ RSpec.describe "bundle gem" do
realworld_system_gems gems, :path => path
bundle "install", :dir => bundled_app("#{gem_name}")
bundle "exec rubocop", :dir => bundled_app("#{gem_name}")
-
expect($?.exitstatus).to eq(0) if exitstatus
end
end
@@ -555,7 +555,7 @@ RSpec.describe "bundle gem" do
t.test_files = FileList["test/**/*_test.rb"]
end
- task :default => :test
+ task default: :test
RAKEFILE
expect(bundled_app("#{gem_name}/Rakefile").read).to eq(rakefile)
@@ -613,7 +613,7 @@ RSpec.describe "bundle gem" do
t.test_files = FileList["test/**/*_test.rb"]
end
- task :default => :test
+ task default: :test
RAKEFILE
expect(bundled_app("#{gem_name}/Rakefile").read).to eq(rakefile)
@@ -914,7 +914,7 @@ RSpec.describe "bundle gem" do
ext.lib_dir = "lib/#{gem_name}"
end
- task :default => [:clobber, :compile]
+ task default: [:clobber, :compile]
RAKEFILE
expect(bundled_app("#{gem_name}/Rakefile").read).to eq(rakefile)
@@ -1010,7 +1010,7 @@ Usage: "bundle gem NAME [OPTIONS]"
RSpec::Core::RakeTask.new(:spec)
- task :default => :spec
+ task default: :spec
RAKEFILE
expect(bundled_app("foobar/Rakefile").read).to eq(rakefile)