Created
February 14, 2014 18:48
-
-
Save acook/9006695 to your computer and use it in GitHub Desktop.
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
module Assertions | |
module_function | |
def assert_close_enough value1, value2 | |
assert_equal value1.round, value2.round | |
end | |
end |
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
require_relative 'test_helper' | |
class TestOtherThing < MiniTest::Unit::TestCase | |
def test_closeness | |
Assertions.assert_close_enough 1.7, 1.8 | |
end | |
end |
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
require_relative 'assertions' |
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
require_relative 'test_helper' | |
class TestThing < MiniTest::Unit::TestCase | |
include Assertions | |
def test_closeness | |
assert_close_enough 1.5, 1.6 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment