Module: Treebis::Test::TestSopen

Included in:
TestCase
Defined in:
lib/treebis.rb

Instance Method Summary collapse

Instance Method Details

#test_sopen2_failsObject



1403
1404
1405
1406
1407
1408
# File 'lib/treebis.rb', line 1403

def test_sopen2_fails
  e = assert_raises(RuntimeError) do
    Treebis::Sopen2.sopen2assert('patch', '-u', 'foo', 'bar')
  end
  assert_match(/Can't open patch file bar/, e.message)
end

#test_sopen2_succeedsObject



1409
1410
1411
1412
# File 'lib/treebis.rb', line 1409

def test_sopen2_succeeds
  out = Treebis::Sopen2.sopen2assert('echo', 'baz')
  assert_equal "baz\n", out
end