Skip to content

Instantly share code, notes, and snippets.

@chad
Created October 28, 2010 19:50
Show Gist options
  • Save chad/652193 to your computer and use it in GitHub Desktop.
Save chad/652193 to your computer and use it in GitHub Desktop.
require 'test/unit'
class Strange<Test::Unit::TestCase
def test_x
assert_raises NameError do
strange
end
begin
strange = THIS_CONSTANT_IS_MISSING
rescue NameError # we expect this
end
assert_nil strange
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment