1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/did_you_mean/test_verbose_formatter.rb
Nobuyoshi Nakada ee518cf077
Revert "Sync did_you_mean"
This reverts commit 946dadd3f4,
which broke `TestGemRequire` and others.
2020-05-12 16:27:25 +09:00

22 lines
529 B
Ruby

require_relative './helper'
class VerboseFormatterTest < Test::Unit::TestCase
def setup
require_relative File.join(DidYouMean::TestHelper.root, 'verbose')
DidYouMean.formatter = DidYouMean::VerboseFormatter.new
end
def teardown
DidYouMean.formatter = DidYouMean::PlainFormatter.new
end
def test_message
@error = assert_raise(NoMethodError){ 1.zeor? }
assert_match <<~MESSAGE.strip, @error.message
undefined method `zeor?' for 1:Integer
Did you mean? zero?
MESSAGE
end
end