Sha256: 288104143fb950e26a0ac9b153ed60a081b41f6f5e08699c7a5fd2465baefe59
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
# Copyright:: (c) Autotelik Media Ltd 2015 # Author :: Tom Statter # License:: MIT # require File.dirname(__FILE__) + '/../spec_helper' module DataShift describe 'Generator Base' do before(:each) do DataShift::Exporters::Configuration.reset end it 'should initialize' do expect(GeneratorBase.new).to be end =begin Headers moved into Schema context 'generation' do include_context 'ClearThenManageProject' let(:gb) { x = GeneratorBase.new; Headers.klass_to_headers(Project); x } it 'should create an instance of Headers from a Domain Model' do expect(gb.headers).to be_a Headers expect(gb.headers[0]).to be_a Header end it 'sets the source of the Headers to the Domain Model' do expect(gb.headers.source).to eq Project end it 'should create one header per Domain Model attribute' do expect(gb.headers.size).to eq Project.new.serializable_hash.keys.size end it 'headers are the model method operator name' do expect(gb.headers[0]).to be_a Header expect(gb.headers[0].source).to be_a String end end =end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datashift-0.40.1 | spec/exporters/generator_base_spec.rb |
datashift-0.40.0 | spec/exporters/generator_base_spec.rb |