ruby-changes:58307
From: Nobuyoshi <ko1@a...>
Date: Fri, 18 Oct 2019 15:20:25 +0900 (JST)
Subject: [ruby-changes:58307] d4e52f672c (master): Added no suggestion test case
https://git.ruby-lang.org/ruby.git/commit/?id=d4e52f672c From d4e52f672cf520d6929d22310a340e09fcb0e35d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 18 Oct 2019 15:19:26 +0900 Subject: Added no suggestion test case diff --git a/test/optparse/test_did_you_mean.rb b/test/optparse/test_did_you_mean.rb index c5beaa4..2d0a9a6 100644 --- a/test/optparse/test_did_you_mean.rb +++ b/test/optparse/test_did_you_mean.rb @@ -15,6 +15,11 @@ class TestOptionParser::DidYouMean < TestOptionParser https://github.com/ruby/ruby/blob/trunk/test/optparse/test_did_you_mean.rb#L15 ::DidYouMean.formatter = @formatter end + def test_no_suggestion + assert_raise_with_message(OptionParser::InvalidOption, "invalid option: --cuz") do + @opt.permute!(%w"--cuz") + end + end def test_plain ::DidYouMean.formatter = ::DidYouMean::PlainFormatter.new -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/