summaryrefslogtreecommitdiff
path: root/test/did_you_mean/test_verbose_formatter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/did_you_mean/test_verbose_formatter.rb')
-rw-r--r--test/did_you_mean/test_verbose_formatter.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/test/did_you_mean/test_verbose_formatter.rb b/test/did_you_mean/test_verbose_formatter.rb
deleted file mode 100644
index 411f175180..0000000000
--- a/test/did_you_mean/test_verbose_formatter.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-require_relative './helper'
-
-class VerboseFormatterTest < Test::Unit::TestCase
- class ErrorHighlightDummyFormatter
- def message_for(spot)
- ""
- end
- end
-
- def setup
- require_relative File.join(DidYouMean::TestHelper.root, 'verbose')
-
- DidYouMean.formatter = DidYouMean::VerboseFormatter.new
-
- if defined?(ErrorHighlight)
- @error_highlight_old_formatter = ErrorHighlight.formatter
- ErrorHighlight.formatter = ErrorHighlightDummyFormatter.new
- end
- end
-
- def teardown
- DidYouMean.formatter = DidYouMean::PlainFormatter.new
-
- if defined?(ErrorHighlight)
- ErrorHighlight.formatter = @error_highlight_old_formatter
- end
- 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