This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_methods_can_be_invoked_by_sending_the_message | |
mc = MessageCatcher.new | |
assert mc.send(:caught?) #Note: so this is the same as mc.caught? | |
end | |
def test_methods_can_be_invoked_more_dynamically #Note: or it shoudl say, calling a method is the same as sending a message to the class object. | |
mc = MessageCatcher.new | |
assert mc.send("caught?") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |