From cd3804af5d52c6855377031583719d7df1abd92a Mon Sep 17 00:00:00 2001 From: zhephyn Date: Mon, 21 Sep 2026 05:22:10 +0300 Subject: [PATCH 1/2] Use the project name instead of hard coded empty_ruby_project_generator in the generated README file --- spec/generate_empty_ruby_project_spec.rb | 9 +++++++++ templates/README.md.erb | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/spec/generate_empty_ruby_project_spec.rb b/spec/generate_empty_ruby_project_spec.rb index c4bf933..05f97a7 100644 --- a/spec/generate_empty_ruby_project_spec.rb +++ b/spec/generate_empty_ruby_project_spec.rb @@ -22,6 +22,15 @@ expect(result["spec/spec_helper.rb"]).to include('require_relative "../boot/finish"') end + it "uses the generated project library path in the README" do + expect(outcome).to be_success + + expect(result["README.md"]).to include( + "lib/name_space1_name_space1/name_space3_name_space4.rb" + ) + expect(result["README.md"]).not_to include("empty_ruby_project_generator") + end + context "with all options" do let(:homepage_url) { "https://example.com" } let(:license) { "MIT" } diff --git a/templates/README.md.erb b/templates/README.md.erb index 3840260..6e464e5 100644 --- a/templates/README.md.erb +++ b/templates/README.md.erb @@ -3,7 +3,7 @@ TODO: Delete this and the text below, and describe your gem Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library -into a gem. Put your Ruby code in the file `lib/foobara/empty_ruby_project_generator`. To experiment with that code, +into a gem. Put your Ruby code in the file `lib/<%= org_slash_project_underscore %>.rb`. To experiment with that code, run `bin/console` for an interactive prompt. From 689ce89f73196287cec03a8d12eab7d2172bd9c0 Mon Sep 17 00:00:00 2001 From: zhephyn Date: Mon, 21 Sep 2026 15:28:31 +0300 Subject: [PATCH 2/2] Remove test which checks that the generated README.md file doesn't contain empty_ruby_project_generator as the project name --- spec/generate_empty_ruby_project_spec.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/generate_empty_ruby_project_spec.rb b/spec/generate_empty_ruby_project_spec.rb index 05f97a7..63000e4 100644 --- a/spec/generate_empty_ruby_project_spec.rb +++ b/spec/generate_empty_ruby_project_spec.rb @@ -28,7 +28,6 @@ expect(result["README.md"]).to include( "lib/name_space1_name_space1/name_space3_name_space4.rb" ) - expect(result["README.md"]).not_to include("empty_ruby_project_generator") end context "with all options" do