Created
January 15, 2015 18:16
-
-
Save miah/595d7c22920d02aee178 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 'minitest/autorun' | |
| class TestFoo < Minitest::Test | |
| def test_args | |
| assert(working_call(named1: 'biz', named2: 'baz', obj_hash: { foo: 'bar' })) | |
| assert(crash_call(named1: 'biz', named2: 'baz', obj_hash: { foo: 'bar' })) | |
| end | |
| def working_call(named1: nil, named2: nil, obj_hash: {}) | |
| obj_hash || {} | |
| end | |
| def crash_call(named1: nil, named2: nil, obj_hash: {}) | |
| obj_hash || {} | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment