aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/whiny_nil_test.rb
blob: 8c1f1b26777247ffd694a4ccd4e2e664325cb35a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
require 'abstract_unit'
require 'active_support/whiny_nil'

class WhinyNilTest < Test::Unit::TestCase
  def test_id
    nil.id
  rescue RuntimeError => nme
    assert_no_match(/nil:NilClass/, nme.message)
    assert_match(Regexp.new(nil.object_id.to_s), nme.message)
  end
end