aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/command/spellchecker_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/command/spellchecker_test.rb')
-rw-r--r--railties/test/command/spellchecker_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/command/spellchecker_test.rb b/railties/test/command/spellchecker_test.rb
new file mode 100644
index 0000000000..aff50a3e73
--- /dev/null
+++ b/railties/test/command/spellchecker_test.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+require "abstract_unit"
+require "rails/command/spellchecker"
+
+class Rails::Command::SpellcheckerTest < ActiveSupport::TestCase
+ test "suggests a word correction from dictionary" do
+ assert_equal %w(thin cgi puma), Rails::Command::Spellchecker.suggest("tin", from: %w(puma thin cgi))
+ end
+end