Sha256: 1b488dae8ee2fab37193f1ba111fb5c2ede664f678c3ecbfb178a241693d7428

Contents?: true

Size: 489 Bytes

Versions: 1

Compression:

Stored size: 489 Bytes

Contents

require 'text2svg/cli'

module Text2svgCLITest
  def test_start(t)
    ARGV[0] = 'abc'
    ARGV[1] = '--font=/Library/Fonts/Times New Roman.ttf'
    out = capture do
      Text2svg::CLI.start
    end
    unless String === out
      t.error 'return value was break'
    end
    unless 0 < out.length
      t.error 'unsupported font?'
    end
  end

  def capture
    out = StringIO.new
    orig = $stdout
    $stdout = out
    yield
    out.string.dup
  ensure
    $stdout = orig
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
text2svg-0.0.1 lib/text2svg/cli_test.rb