Sha256: 07a7481368ee586fac989f9597458afe8175182ab0ab9ca3800a79092d3b3bbe

Contents?: true

Size: 461 Bytes

Versions: 5

Compression:

Stored size: 461 Bytes

Contents

require_relative  '../../spec_helper'

describe Syncano::Schema::AttributeDefinition do
  let(:name) { 'example' }
  let(:raw_definition) { {} }

  subject { described_class.new name, raw_definition }

  specify { expect(subject.name).to eq(name) }

  context 'when name is "class"' do
    let(:name) { 'class' }

    it 'should be named associated_class to avoid method name collision' do
      expect(subject.name).to eq('associated_class')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
syncano-4.0.0.alpha4 spec/unit/schema/attribute_definition_spec.rb
syncano-4.0.0.alpha3 spec/unit/schema/attribute_definition_spec.rb
syncano-4.0.0.alpha2 spec/unit/schema/attribute_definition_spec.rb
syncano-4.0.0.alpha1 spec/unit/schema/attribute_definition_spec.rb
syncano-4.0.0.alpha spec/unit/schema/attribute_definition_spec.rb