Sha256: 648d10c8049573776cfe11194828153fe4d57ef11452027263a0e12ab1869753
Contents?: true
Size: 865 Bytes
Versions: 6
Compression:
Stored size: 865 Bytes
Contents
require File.expand_path(File.join(__FILE__, '..', 'test_helper')) class CommandTest < Test::Unit::TestCase def setup ENV['RUBBER_ROOT'] = Rubber.root end def test_rubber_help out = `rubber` assert out =~ /Subcommands:\n(.*)\nOptions:/m subcommands = $1.scan(/^\s*(\S+)\s*/).flatten assert_equal ["config", "cron", "util:rotate_logs", "util:backup", "util:backup_db", "util:restore_db", "vulcanize"].sort, subcommands.sort end def test_rubber_help_size out = `rubber --help` assert out.lines.all? {|l| l.size <= 81 } assert out =~ /Subcommands:\n(.*)\nOptions:/m subcommands = $1.scan(/^\s*(\S+)\s*/).flatten assert subcommands.size > 0 subcommands.each do |s| out = `rubber #{s} --help` assert out.lines.all? {|l| l.size <= 81 }, "help for #{s} exceeds 80 chars" end end end
Version data entries
6 entries across 6 versions & 1 rubygems