Created
February 15, 2015 23:09
-
-
Save mikedao/a98c1253fd32c4743236 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Cat | |
def initialize | |
end | |
def to_s | |
return "This is a string" | |
end | |
end |
This file contains hidden or 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
require 'minitest/autorun' | |
require 'minitest/pride' | |
require_relative 'cat' | |
class CatTest < Minitest::Test | |
def test_to_s | |
cat = Cat.new | |
result = cat.to_s | |
assert_equal "This is a string", result | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment