Sha256: 4f99a5a39ec0bb5137b8bc6f1aae2ef00e4bedf54cc52f74f8e713dd193907df

Contents?: true

Size: 612 Bytes

Versions: 6

Compression:

Stored size: 612 Bytes

Contents

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

class TestCli < Test::Unit::TestCase
  def setup
    `rm -rf /tmp/sample_project`
  end

  context 'the cli' do

    should "fail without arguments" do
      output = silence_logger { generate(:cli) }
      assert_match "Please specify generator to use", output
    end

    should "work correctly if we have a project" do
      silence_logger { generate(:project, 'sample_project', '--root=/tmp') }
      assert_nothing_raised { silence_logger { generate(:cli, '--root=/tmp/sample_project') } }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
padrino-gen-0.9.15 test/test_cli.rb
padrino-gen-0.9.14 test/test_cli.rb
padrino-gen-0.9.13 test/test_cli.rb
padrino-gen-0.9.12 test/test_cli.rb
padrino-gen-0.9.11 test/test_cli.rb
padrino-gen-0.9.10 test/test_cli.rb