Sha256: f99c549f95befcb459a2f6cbebcb122e2b87dd7d5d3c9bf521f5cc1bc873a76f

Contents?: true

Size: 1.25 KB

Versions: 13

Compression:

Stored size: 1.25 KB

Contents

require 'fileutils'

require 'gooddata/cli/cli'

describe 'GoodData::CLI - scaffold', :broken => true do
  TEST_PROJECT_NAME = 'test-project'
  TEST_BRICK_NAME = 'test-brick'

  describe 'scaffold' do
    it 'Complains when no subcommand specified' do
      args = %w(scaffold)

      out = run_cli(args)
      out.should include "Command 'scaffold' requires a subcommand project,brick"
    end
  end

  describe 'scaffold brick' do
    it 'Complains when brick name is not specified' do
      args = %w(scaffold brick)

      out = run_cli(args)
      out.should include 'Name of the brick has to be provided'
    end

    it 'Scaffolds brick if the name is specified' do
      args = [
        'scaffold',
        'brick',
        TEST_BRICK_NAME
      ]

      run_cli(args)
      FileUtils.rm_rf(TEST_BRICK_NAME)
    end
  end

  describe 'scaffold project' do
    it 'Complains when project name is not specified' do
      args = %w(scaffold project)

      out = run_cli(args)
      out.should include 'Name of the project has to be provided'
    end

    it "Scaffolds project if the name is specified" do
      args = [
        'scaffold',
        'project',
        TEST_PROJECT_NAME
      ]

      run_cli(args)
      FileUtils.rm_rf(TEST_PROJECT_NAME)
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gooddata-0.6.20 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.19 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.18 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.17 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.16 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.15 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.14 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.13 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.12 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.11 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.10 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.9 spec/unit/cli/commands/cmd_scaffold_spec.rb
gooddata-0.6.8 spec/unit/cli/commands/cmd_scaffold_spec.rb