Skip to content

Commit 8a802f7

Browse files
deivid-rodriguezhsbt
authored andcommitted
[rubygems/rubygems] Fix assertions to not depend on specific gem name
ruby/rubygems@27a4af859e
1 parent e95adbf commit 8a802f7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/bundler/commands/newgem_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def ignore_paths
190190

191191
it "generates a gem skeleton with rubocop" do
192192
gem_skeleton_assertions
193-
expect(bundled_app("test-gem/Rakefile")).to read_as(
193+
expect(bundled_app("#{gem_name}/Rakefile")).to read_as(
194194
include("# frozen_string_literal: true").
195195
and(include('require "rubocop/rake_task"').
196196
and(include("RuboCop::RakeTask.new").
@@ -227,8 +227,8 @@ def ignore_paths
227227

228228
it "generates a gem skeleton without rubocop" do
229229
gem_skeleton_assertions
230-
expect(bundled_app("test-gem/Rakefile")).to read_as(exclude("rubocop"))
231-
expect(bundled_app("test-gem/#{gem_name}.gemspec")).to read_as(exclude("rubocop"))
230+
expect(bundled_app("#{gem_name}/Rakefile")).to read_as(exclude("rubocop"))
231+
expect(bundled_app("#{gem_name}/#{gem_name}.gemspec")).to read_as(exclude("rubocop"))
232232
end
233233

234234
it "does not include rubocop in generated Gemfile" do
@@ -257,7 +257,7 @@ def ignore_paths
257257

258258
it "generates a gem skeleton with rubocop" do
259259
gem_skeleton_assertions
260-
expect(bundled_app("test-gem/Rakefile")).to read_as(
260+
expect(bundled_app("#{gem_name}/Rakefile")).to read_as(
261261
include("# frozen_string_literal: true").
262262
and(include('require "rubocop/rake_task"').
263263
and(include("RuboCop::RakeTask.new").
@@ -290,7 +290,7 @@ def ignore_paths
290290

291291
it "generates a gem skeleton with standard" do
292292
gem_skeleton_assertions
293-
expect(bundled_app("test-gem/Rakefile")).to read_as(
293+
expect(bundled_app("#{gem_name}/Rakefile")).to read_as(
294294
include('require "standard/rake"').
295295
and(match(/default:.+:standard/))
296296
)
@@ -323,8 +323,8 @@ def ignore_paths
323323

324324
it "generates a gem skeleton without rubocop" do
325325
gem_skeleton_assertions
326-
expect(bundled_app("test-gem/Rakefile")).to read_as(exclude("rubocop"))
327-
expect(bundled_app("test-gem/#{gem_name}.gemspec")).to read_as(exclude("rubocop"))
326+
expect(bundled_app("#{gem_name}/Rakefile")).to read_as(exclude("rubocop"))
327+
expect(bundled_app("#{gem_name}/#{gem_name}.gemspec")).to read_as(exclude("rubocop"))
328328
end
329329

330330
it "does not include rubocop in generated Gemfile" do

0 commit comments

Comments
 (0)