Sha256: bea5d85f4c50a70e8e420feb92e2069e145e782ffc439ec7fb34494fdde223a1

Contents?: true

Size: 720 Bytes

Versions: 1

Compression:

Stored size: 720 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/helper')
require 'tennpipes-init/generators/cli'

describe "Cli" do
  def setup
    @apptmp = "#{Dir.tmpdir}/tennpipes-tests/#{SecureRandom.hex}"
    `mkdir -p #{@apptmp}`
  end

  def teardown
    `rm -rf #{@apptmp}`
  end

  describe 'the cli' do

    it 'should fail without arguments' do
      out, err = capture_io { generate(:cli) }
      assert_match(/Please specify generator to use/, out)
    end

    it 'should work correctly if we have a project' do
      capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}") }
      capture_io { generate(:cli, "--root=#{@apptmp}/sample_project") }
      skip "Make a great asserition"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tennpipes-init-3.6.6 test/test_cli.rb