Last active
August 29, 2015 13:56
-
-
Save AntelopeSalad/9021096 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
# minitest 4.7 | |
# running: ruby test_foo.rb results in a passing test | |
# running the test through sublime/rubytest or the rubymine editor results in a failing test | |
# fail's reason: out is empty and so is err | |
class TestFoo < Minitest::Unit::TestCase | |
def test_my_binary | |
out, err = capture_subprocess_io do | |
system '../../bin/foo version' | |
end | |
assert_match /Foo/, out | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment