Sha256: 94fd34e5493ce38bf1f2584bdca333e988e94e372a066a0f7f799446899366a3

Contents?: true

Size: 593 Bytes

Versions: 18

Compression:

Stored size: 593 Bytes

Contents

require 'spec_helper'
require 'system_builder/cli'

describe SystemBuilder::CLI, "execute" do

  class ExitException < Exception; end;

  before(:each) do
    SystemBuilder::CLI.stub!(:exit).and_raise(ExitException)
  end

  def system_builder(*arguments)
    @stdout_io = StringIO.new

    begin
      SystemBuilder::CLI.execute(@stdout_io, arguments.flatten)
    rescue ExitException

    end

    @stdout_io.rewind
    @stdout = @stdout_io.read
  end
  
  it "should print default output" do
    system_builder "--help"
    @stdout.should =~ /Usage: .* \[options\] image command/
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
system-builder-0.0.26 spec/system_builder/cli_spec.rb
system-builder-0.0.23 spec/system_builder/cli_spec.rb
system-builder-0.0.22 spec/system_builder/cli_spec.rb
system-builder-0.0.21 spec/system_builder/cli_spec.rb
system-builder-0.0.20 spec/system_builder/cli_spec.rb
system-builder-0.0.19 spec/system_builder/cli_spec.rb
system-builder-0.0.18 spec/system_builder/cli_spec.rb
system-builder-0.0.17 spec/system_builder/cli_spec.rb
system-builder-0.0.16 spec/system_builder/cli_spec.rb
system-builder-0.0.15 spec/system_builder/cli_spec.rb
system-builder-0.0.14 spec/system_builder/cli_spec.rb
system-builder-0.0.13 spec/system_builder/cli_spec.rb
system-builder-0.0.12 spec/system_builder/cli_spec.rb
system-builder-0.0.10 spec/system_builder/cli_spec.rb
system-builder-0.0.9 spec/system_builder/cli_spec.rb
system-builder-0.0.7 spec/system_builder/cli_spec.rb
system-builder-0.0.6 spec/system_builder/cli_spec.rb
system-builder-0.0.5 spec/system_builder/cli_spec.rb