Skip to content

Instantly share code, notes, and snippets.

@cwgem
Created July 27, 2011 03:50
Show Gist options
  • Save cwgem/1108635 to your computer and use it in GitHub Desktop.
Save cwgem/1108635 to your computer and use it in GitHub Desktop.
Rubyシンボルとユニットテストの注意するところ
require "test/unit"
class TestLibraryFileName < Test::Unit::TestCase
def my_method
end
def test_symbol
assert_equal true, Symbol.all_symbols.include?(:my_method)
end
def test_symbol2
assert_equal true, Symbol.all_symbols.include?(:hoge)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment