Skip to content

Instantly share code, notes, and snippets.

@caleywoods
Created January 24, 2011 16:58
Show Gist options
  • Save caleywoods/793520 to your computer and use it in GitHub Desktop.
Save caleywoods/793520 to your computer and use it in GitHub Desktop.
def test_method_names_become_symbols
symbols_as_strings = Symbol.all_symbols.map { |x| x.to_s }
assert_equal true, symbols_as_strings.include?("test_method_names_become_symbols")
end
# THINK ABOUT IT:
#
# Why do we convert the list of symbols to strings and then compare
# against the string value rather than against symbols?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment