Sha256: 305a2db34e73e418a893a187fba1dc58d0c6b2188afec3f4a798da671e4cc2ec

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

# encoding: UTF-8

require 'gooddata/connection'
require 'gooddata/core/project'
require 'gooddata/models/project'

describe 'GoodData - project' do
  before(:each) do
    @client = ConnectionHelper.create_default_connection
  end

  after(:each) do
    @client.disconnect
  end

  describe '#project=' do
    it 'Assigns nil' do
      GoodData.project = nil
    end

    it 'Assigns project using project ID' do
      pending 'GoodData::project= is disabled for now'
      GoodData.project = ProjectHelper::PROJECT_ID
    end

    it 'Assigns project using project URL' do
      pending 'GoodData::project= is disabled for now'
      GoodData.project = ProjectHelper::PROJECT_URL
    end

    it 'Assigns project directly' do
      pending 'GoodData::project= is disabled for now'
      GoodData.project = GoodData::Project[ProjectHelper::PROJECT_ID]
    end
  end

  describe '#project' do
    it 'Returns project assigned' do
      pending 'GoodData.project= is disabled for now'

      GoodData.project = nil
      GoodData.project.should == nil

      GoodData.project = ProjectHelper::PROJECT_ID
      GoodData.project.should_not == nil
    end
  end

  describe '#with_project' do
    it 'Uses project specified' do
      GoodData.with_project GoodData::Project[ProjectHelper::PROJECT_ID, :client => @client] do
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gooddata-0.6.8 spec/unit/core/project_spec.rb