Sha256: fcd764288d41fce375405c29c7ab8d58ece0c80ccd4f00c47ee5cab850dfb2b9
Contents?: true
Size: 542 Bytes
Versions: 3
Compression:
Stored size: 542 Bytes
Contents
require_relative 'test_helper' class NameErrorExtensionTest < Minitest::Test class TestFinder def initialize(*); end def did_you_mean?; "Y U SO SLOW?"; end end def setup @old_finder = DidYouMean.finders["NameError"] DidYouMean.finders["NameError"] = TestFinder @error = assert_raises(NameError){ doesnt_exist } end def teardown DidYouMean.finders["NameError"] = @old_finder end def test_message? assert_match "Y U SO SLOW?", @error.to_s assert_match "Y U SO SLOW?", @error.message end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
did_you_mean-0.9.4 | test/name_error_extension_test.rb |
did_you_mean-0.9.2 | test/name_error_extension_test.rb |
did_you_mean-0.9.0 | test/name_error_extension_test.rb |