Sha256: b79da0764c2d1087ac2815db1770868ee5001fa191939ced1beee9de28ecdf84
Contents?: true
Size: 1.58 KB
Versions: 1
Compression:
Stored size: 1.58 KB
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '/spec_helper')) require 'zpng/cli' CLI_PATHNAME = File.expand_path(File.join(File.dirname(__FILE__), '/../bin/zpng')) describe "CLI" do PNGSuite.each_good do |fname| describe fname.sub(%r|\A#{Regexp::escape(Dir.getwd)}/?|, '') do it "works" do orig_stdout, out = $stdout, "" begin $stdout = StringIO.new(out) lambda { ZPNG::CLI.new([fname]).run }.should_not raise_error ensure $stdout = orig_stdout end end it "works verbosely" do orig_stdout, out = $stdout, "" begin $stdout = StringIO.new(out) lambda { ZPNG::CLI.new([fname, "-vvv"]).run }.should_not raise_error ensure $stdout = orig_stdout end end it "to ASCII" do orig_stdout, out = $stdout, "" begin $stdout = StringIO.new(out) lambda { ZPNG::CLI.new([fname, "-A"]).run }.should_not raise_error ensure $stdout = orig_stdout end end it "to ANSI" do orig_stdout, out = $stdout, "" begin $stdout = StringIO.new(out) lambda { ZPNG::CLI.new([fname, "-N"]).run }.should_not raise_error ensure $stdout = orig_stdout end end it "to ANSI256" do orig_stdout, out = $stdout, "" begin $stdout = StringIO.new(out) lambda { ZPNG::CLI.new([fname, "-2"]).run }.should_not raise_error ensure $stdout = orig_stdout end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zpng-0.2.1 | spec/cli_spec.rb |