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

23 lines
476 B
Ruby
Raw Normal View History

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