Sha256: c06107e9a0f03e573114eb9e568b9ec42f34e1dfee0ef23b2996e384fedfa492

Contents?: true

Size: 679 Bytes

Versions: 12

Compression:

Stored size: 679 Bytes

Contents

require File.dirname(__FILE__) + '/helper'
require 'padrino-gen/generators/cli'

class TestCli < Test::Unit::TestCase
  def setup
    `rm -rf /tmp/sample_project`
    @cli     = Padrino::Generators::Cli.dup
    @project = Padrino::Generators::Project.dup
  end

  context 'the cli' do

    should "fail without arguments" do
      output = silence_logger { @cli.start }
      assert_match "Please specify generator to use", output
    end

    should "work correctly if we have a project" do
      silence_logger { @project.start(['sample_project', '--root=/tmp']) }
      assert_nothing_raised { silence_logger { @cli.start(['--root=/tmp/sample_project']) } }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
padrino-gen-0.9.7 test/test_cli.rb
padrino-gen-0.9.6 test/test_cli.rb
padrino-gen-0.9.5 test/test_cli.rb
padrino-gen-0.9.4 test/test_cli.rb
padrino-gen-0.9.3 test/test_cli.rb
padrino-gen-0.9.2 test/test_cli.rb
padrino-gen-0.9.1 test/test_cli.rb
padrino-gen-0.9.0 test/test_cli.rb
padrino-gen-0.8.5 test/test_cli.rb
padrino-gen-0.8.4 test/test_cli.rb
padrino-gen-0.8.3 test/test_cli.rb
padrino-gen-0.8.2 test/test_cli.rb