Sha256: 6586253ea92c90b28b1994d811498728d9e8a5cc5148fcac57a3f60e42850e32
Contents?: true
Size: 699 Bytes
Versions: 5
Compression:
Stored size: 699 Bytes
Contents
require 'spec_helper' describe Rpub::Commands::Main do let(:buffer) { StringIO.new } it 'should default to help text' do described_class.new([], buffer).invoke buffer.string.should =~ /Display command reference/ end it 'should raise error when a subcommand remains' do expect { described_class.new(['foo'], buffer).invoke }.should raise_error(Rpub::InvalidSubcommand) end it 'should print the version number' do described_class.new(['-v'], buffer).invoke buffer.string.should =~ /rpub \d+\.\d+\.\d+/ end it 'should print help text' do described_class.new(['-h'], buffer).invoke buffer.string.should =~ /Display command reference/ end end
Version data entries
5 entries across 5 versions & 1 rubygems