Skip to content

Instantly share code, notes, and snippets.

@AntelopeSalad
Created February 14, 2014 21:21
Show Gist options
  • Save AntelopeSalad/9009562 to your computer and use it in GitHub Desktop.
Save AntelopeSalad/9009562 to your computer and use it in GitHub Desktop.
require 'minitest/autorun'
require 'open3'
class TestOutput < Minitest::Unit::TestCase
def test_that_open3_works
_,stdout = Open3.popen2('rails -v')
puts stdout.read.chomp # => empty string
assert_match /Rails/, stdout.read.chomp
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment