Sha256: e045549409fb4eb54105eff74196bc18bfbba3c6b595edf2b308f3a5dcb28419

Contents?: true

Size: 589 Bytes

Versions: 3

Compression:

Stored size: 589 Bytes

Contents

require 'open3'
require 'spec_helper'

include PlanterHelpers

describe 'CLI' do
  TEST_DIR = File.join(File.dirname(__FILE__), 'test')

  before do
    FileUtils.rm_rf(TEST_DIR)
    FileUtils.mkdir_p(TEST_DIR)
  end

  after do
    FileUtils.rm_rf(TEST_DIR)
  end

  it 'displays help message' do
    output, stderr, status = planter('--help')
    expect(output).not_to be_empty
  end

  it 'plants a new project' do
    output, stderr, status = planter('--defaults', "--in=#{TEST_DIR}", 'test')
    expect(File.exist?(File.join(TEST_DIR, 'bollocks_and_beans.rtf'))).to be true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
planter-cli-3.0.4 spec/cli_spec.rb
planter-cli-3.0.3 spec/cli_spec.rb
planter-cli-3.0.2 spec/cli_spec.rb