summaryrefslogtreecommitdiff
path: root/test/optparse
diff options
context:
space:
mode:
authorMSP-Greg <MSP-Greg@users.noreply.github.com>2019-10-20 18:30:42 -0500
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-21 09:53:56 +0900
commit71ffe40a447a17a1c3388374b7c9979c826b131d (patch)
tree46bab61df4fd0907708810dd39ffe7ac03c31f06 /test/optparse
parent27261007eb45adae4d5b30cbafa2ef27a2345b3f (diff)
test/optparse/test_did_you_mean.rb - fix suggestion order
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2581
Diffstat (limited to 'test/optparse')
-rw-r--r--test/optparse/test_did_you_mean.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/optparse/test_did_you_mean.rb b/test/optparse/test_did_you_mean.rb
index 19bb4b9..57fa1e9 100644
--- a/test/optparse/test_did_you_mean.rb
+++ b/test/optparse/test_did_you_mean.rb
@@ -27,7 +27,7 @@ class TestOptionParser::DidYouMean < TestOptionParser
end
def test_plain
- assert_raise_with_message(OptionParser::InvalidOption, /invalid option: --baa\nDid you mean\?\s+baz\s+bar\Z/) do
+ assert_raise_with_message(OptionParser::InvalidOption, /invalid option: --baa\nDid you mean\?\s+bar\s+baz\Z/) do
@opt.permute!(%w"--baa")
end
end
@@ -35,13 +35,13 @@ class TestOptionParser::DidYouMean < TestOptionParser
def test_verbose
require 'did_you_mean/formatters/verbose_formatter'
::DidYouMean.formatter = ::DidYouMean::VerboseFormatter.new
- assert_raise_with_message(OptionParser::InvalidOption, /invalid option: --baa\n\s+Did you mean\?\s+baz\s+bar\s*\Z/) do
+ assert_raise_with_message(OptionParser::InvalidOption, /invalid option: --baa\n\s+Did you mean\?\s+bar\s+baz\s*\Z/) do
@opt.permute!(%w"--baa")
end
end
def test_ambiguos
- assert_raise_with_message(OptionParser::AmbiguousOption, /ambiguous option: --ba\nDid you mean\?\s+baz\s+bar\Z/) do
+ assert_raise_with_message(OptionParser::AmbiguousOption, /ambiguous option: --ba\nDid you mean\?\s+bar\s+baz\Z/) do
@opt.permute!(%w"--ba")
end
end