require_relative '../helper'

class UncorrectableNameCheckTest < Test::Unit::TestCase
  class FirstNameError < NameError; end

  def setup
    @error = assert_raise(FirstNameError) do
      raise FirstNameError, "Other name error"
    end
  end

  def test_message
    assert_equal "Other name error", @error.message
  end
end

require_relative '../helper'

class UncorrectableNameCheckTest < Test::Unit::TestCase
  class FirstNameError < NameError; end

  def setup
    @error = assert_raise(FirstNameError) do
      raise FirstNameError, "Other name error"
    end
  end

  def test_message
    assert_not_match /Did you mean\?/, @error.message
  end
end

Use assert_not_match "Did you mean?" for UncorrectableNameCheckTest
Use assert_not_match "Did you mean?" for UncorrectableNameCheckTest

... instead of exact matching. I'm now creating a built-in gem that
modifies Exception's error message, so the expectation value is changed.

IMO, it is good to check that did_you_mean suggestion is NOT added in
the uncorrectable case.
