Sha256: f8e4958616a188382aaccf8cffb495e3f93720ce8c1f6714c01cebeaa6f84aa3

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

require 'gooddata/commands/scaffold'

describe GoodData::Command::Scaffold do
  before(:all) do
    @suffix = Time.now.strftime('%Y%m%d%H%M%S')
  end

  before(:each) do
    ConnectionHelper::create_default_connection
  end

  it "Is Possible to create GoodData::Command::Scaffold instance" do
    cmd = GoodData::Command::Scaffold.new()
    cmd.should be_a(GoodData::Command::Scaffold)
  end

  describe "#brick" do
    before(:each) do
      @brick_name = "test_brick_#{@suffix}"
    end

    after(:each) do
      FileUtils.rm_rf @brick_name
    end

    it "Throws ArgumentError exception if no name specified" do
      expect do
        GoodData::Command::Scaffold.brick(nil)
      end.to raise_exception
    end

    it "Scaffolds new brick" do
      GoodData::Command::Scaffold.brick(@brick_name)
    end
  end

  describe "#project" do
    before(:each) do
      @project_name = "test_project_#{@suffix}"
    end

    after(:each) do
      FileUtils.rm_rf @project_name
    end

    it "Throws ArgumentError exception if no name specified" do
      expect do
        GoodData::Command::Scaffold.project(nil)
      end.to raise_exception
    end

    it "Scaffolds new project" do
      GoodData::Command::Scaffold.project(@project_name)
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gooddata-0.6.0 spec/unit/commands/command_scaffold_spec.rb