Sha256: 9c91c42727ebb3536138fb22b76ec6a343f0637cf663ed59a94b9eeee82fe38d

Contents?: true

Size: 660 Bytes

Versions: 14

Compression:

Stored size: 660 Bytes

Contents

# encoding: UTF-8

require 'pry'
require 'gooddata/models/model'

describe GoodData::Model::SchemaBuilder do

  it "should create a schema" do
    # pending("Using of humanize")

    builder = GoodData::Model::SchemaBuilder.new("a_title")
    blueprint = builder.to_blueprint
    blueprint.title.should == "A Title"
    blueprint.name.should == "a_title"
  end

  it "should create a schema with some columns" do
    builder = GoodData::Model::SchemaBuilder.new("payments")
    builder.add_attribute("id", :title => "My Id")
    builder.add_fact("amount", :title => "Amount")

    blueprint = builder.to_blueprint
    blueprint.attributes.count == 1
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gooddata-0.6.18 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.17 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.16 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.15 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.14 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.13 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.12 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.11 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.10 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.9 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.8 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.7 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.6 spec/unit/models/schema_builder_spec.rb
gooddata-0.6.5 spec/unit/models/schema_builder_spec.rb