Sha256: f5d39b9dafd48d30d99b2e2a7f2b4333e5dd55bb14b4740511cc8e89566f0d2d

Contents?: true

Size: 817 Bytes

Versions: 10

Compression:

Stored size: 817 Bytes

Contents

require 'spec_helper'
require 'json'

describe Spectifly::Base::Builder do
  describe '.from_path' do
    it 'generates builder from entity at given path' do
      path_builder = described_class.from_path(fixture_path('individual'))
      path_builder.root.should == 'Individual'
    end
  end

  describe '#build' do
    it 'raises subclass responsibility error' do
      entity = Spectifly::Entity.parse(fixture_path('individual'))
      expect {
        described_class.new(entity).build
      }.to raise_error("Subclass Responsibility")
    end
  end

  describe '#custom_types' do
    it 'return an array of all non-built-in types in result' do
      entity = Spectifly::Entity.parse(fixture_path('group'))
      described_class.new(entity).custom_types.should =~ [
        'individual'
      ]
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spectifly-0.0.10 spec/spectifly/base/builder_spec.rb
spectifly-0.0.9 spec/spectifly/base/builder_spec.rb
spectifly-0.0.8 spec/spectifly/base/builder_spec.rb
spectifly-0.0.7 spec/spectifly/base/builder_spec.rb
spectifly-0.0.6 spec/spectifly/base/builder_spec.rb
spectifly-0.0.5 spec/spectifly/base/builder_spec.rb
spectifly-0.0.4 spec/spectifly/base/builder_spec.rb
spectifly-0.0.3 spec/spectifly/base/builder_spec.rb
spectifly-0.0.2 spec/spectifly/base/builder_spec.rb
spectifly-0.0.1 spec/spectifly/base/builder_spec.rb