From 40b209db53796ae515387d0fee2a525872eb2ae4 Mon Sep 17 00:00:00 2001 From: Alberto Almagro Date: Tue, 26 Jun 2018 22:02:51 +0200 Subject: Recommend use of rails over bin/rails As discussed in #33203 rails command already looks for, and runs, bin/rails if it is present. We were mixing recommendations within guides and USAGE guidelines, in some files we recommended using rails, in others bin/rails and in some cases we even had both options mixed together. --- railties/test/commands/credentials_test.rb | 2 +- railties/test/commands/encrypted_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/test/commands') diff --git a/railties/test/commands/credentials_test.rb b/railties/test/commands/credentials_test.rb index fc16b8194f..5b8b9e4eda 100644 --- a/railties/test/commands/credentials_test.rb +++ b/railties/test/commands/credentials_test.rb @@ -15,7 +15,7 @@ class Rails::Command::CredentialsCommandTest < ActiveSupport::TestCase test "edit without editor gives hint" do run_edit_command(editor: "").tap do |output| assert_match "No $EDITOR to open file in", output - assert_match "bin/rails credentials:edit", output + assert_match "rails credentials:edit", output end end diff --git a/railties/test/commands/encrypted_test.rb b/railties/test/commands/encrypted_test.rb index 9fc73d5f18..8b608fe8c0 100644 --- a/railties/test/commands/encrypted_test.rb +++ b/railties/test/commands/encrypted_test.rb @@ -14,7 +14,7 @@ class Rails::Command::EncryptedCommandTest < ActiveSupport::TestCase test "edit without editor gives hint" do run_edit_command("config/tokens.yml.enc", editor: "").tap do |output| assert_match "No $EDITOR to open file in", output - assert_match "bin/rails encrypted:edit", output + assert_match "rails encrypted:edit", output end end -- cgit v1.2.3 From a7986aeda0b60a1453d7aa70077abcaa7ecab369 Mon Sep 17 00:00:00 2001 From: Alberto Almagro Date: Fri, 29 Jun 2018 17:51:57 +0200 Subject: Show rails instead of bin/rails on USAGE instructions With this commit, rails commands usage instructions display now +rails+ instead of +bin/rails+ within their recommendations. --- railties/test/commands/dbconsole_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/test/commands') diff --git a/railties/test/commands/dbconsole_test.rb b/railties/test/commands/dbconsole_test.rb index 0aea21051a..5e3eca6585 100644 --- a/railties/test/commands/dbconsole_test.rb +++ b/railties/test/commands/dbconsole_test.rb @@ -265,14 +265,14 @@ class Rails::DBConsoleTest < ActiveSupport::TestCase stdout = capture(:stdout) do Rails::Command.invoke(:dbconsole, ["-h"]) end - assert_match(/bin\/rails dbconsole \[environment\]/, stdout) + assert_match(/rails dbconsole \[environment\]/, stdout) end def test_print_help_long stdout = capture(:stdout) do Rails::Command.invoke(:dbconsole, ["--help"]) end - assert_match(/bin\/rails dbconsole \[environment\]/, stdout) + assert_match(/rails dbconsole \[environment\]/, stdout) end attr_reader :aborted, :output -- cgit v1.2.3