require 'text2svg/cli' module Text2svgCLITest def test_start(t) %w(left right center).each do |text_align| ARGV[0] = "Hello,\nWorld!" ARGV[1] = '--font=/Library/Fonts/Times New Roman.ttf' ARGV[2] = "--text-align=#{text_align}" 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 if out.strip[0,4] != "