Created
September 23, 2012 16:31
-
-
Save edipofederle/3772228 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
| require "rubygems" | |
| require "test/unit" | |
| class Array | |
| def square | |
| self.collect {|num| num * num} | |
| end | |
| end | |
| class TestLibraryFileName < Test::Unit::TestCase | |
| def test_case_name | |
| array = [1.0,2.0,3.0] | |
| assert_equal([1.0,4.0,9.0], array.square) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment