Sha256: 4e310f3d1ab388dd90a0bf94b4680c1f12af1e4aa8cf967726c66e6000fa838a

Contents?: true

Size: 609 Bytes

Versions: 9

Compression:

Stored size: 609 Bytes

Contents

require 'test_helper'

class CommandLineTest < Test::Unit::TestCase
  include Sprout::TestHelper

  context "a new command line ui" do
    
    setup do
      @logger          = Sprout::OutputBuffer.new
      @instance        = Sprout::CommandLine.new
      @instance.logger = @logger
    end

    should "display the version number" do
      @instance.parse! ['--version']
      @instance.execute
      assert_matches /sprout #{Sprout::VERSION::STRING}/, @logger.read
    end

    should "display helper if no options provided" do
      @instance.expects :abort
      @instance.parse! []
    end
  end
end


Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sprout-1.1.18.pre test/unit/command_line_test.rb
sprout-1.1.17.pre test/unit/command_line_test.rb
sprout-1.1.16.pre test/unit/command_line_test.rb
sprout-1.1.15.pre test/unit/command_line_test.rb
sprout-1.1.14.pre test/unit/command_line_test.rb
sprout-1.1.13.pre test/unit/command_line_test.rb
sprout-1.1.11.pre test/unit/command_line_test.rb
sprout-1.1.10.pre test/unit/command_line_test.rb
sprout-1.1.7.pre test/unit/command_line_test.rb