Sha256: 8ecdc4e27883dbb7a7db0df17563a2e7bb3e9c64ecd0ceed0d784b18719fdeec
Contents?: true
Size: 834 Bytes
Versions: 5
Compression:
Stored size: 834 Bytes
Contents
require 'spec_helper' require 'moblues/data_model/attribute' module Moblues module DataModel describe Attribute do describe '#initialize' do context 'when name and type provided' do subject { described_class.new(name: 'attribute', type: 'type') } it 'returns an Attribute object' do expect(subject).to eq(Attribute.new(name: 'attribute', type: 'type')) end end context 'when name missing' do it 'raises an assertion' do expect { Attribute.new(type: 'type') }.to raise_exception(KeyError) end end context 'when type missing' do it 'raises an assertion' do expect { Attribute.new(name: 'attribute') }.to raise_exception(KeyError) end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems