aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/commands
diff options
context:
space:
mode:
authorGenadi Samokovarov <gsamokovarov@gmail.com>2018-03-17 15:55:44 +0200
committerGenadi Samokovarov <gsamokovarov@gmail.com>2018-03-23 11:36:03 +0200
commitcb25f2c989588edf77f978820196b4446e01ffe8 (patch)
tree0dd189e6496b065194ec99a04b5c3e3651449031 /railties/test/commands
parentef73318e29666786feb00e9e9b3b49a771bb0b73 (diff)
downloadrails-cb25f2c989588edf77f978820196b4446e01ffe8.tar.gz
rails-cb25f2c989588edf77f978820196b4446e01ffe8.tar.bz2
rails-cb25f2c989588edf77f978820196b4446e01ffe8.zip
Use `did_you_mean` spell checker for option suggestions
Now that we require Ruby over `2.3`, we can replace the current suggestion methods we have with tooling from the `did_you_mean` gem. There is a small user visible change and this is that we now offer a single suggestion for misspelled options. We are suggesting fixes during generator invocation and during a mistyped rails server rack handler. In both cases, if we don't make a proper prediction on the first match, we won't do so in the second or third one, so in my mind, this is okay.
Diffstat (limited to 'railties/test/commands')
-rw-r--r--railties/test/commands/server_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/test/commands/server_test.rb b/railties/test/commands/server_test.rb
index 467afe7cea..bdaab477f1 100644
--- a/railties/test/commands/server_test.rb
+++ b/railties/test/commands/server_test.rb
@@ -29,7 +29,7 @@ class Rails::Command::ServerCommandTest < ActiveSupport::TestCase
end
def test_using_server_mistype
- assert_match(/Could not find server "tin". Maybe you meant "thin" or "cgi"/, run_command("--using", "tin"))
+ assert_match(/Could not find server "tin". Maybe you meant "thin"?/, run_command("--using", "tin"))
end
def test_using_positional_argument_deprecation