Sha256: a253142e3d401473fe6cc94ea453f84f5ee321cb2961bf474175be3419f538b5
Contents?: true
Size: 1010 Bytes
Versions: 2
Compression:
Stored size: 1010 Bytes
Contents
require 'spec_helper' describe Flms::ParagraphLayer do include NamedFactories describe 'view_object' do it 'provides a view object' do expect(subject.view_object).to be_a Flms::ParagraphLayerViewObject end end describe 'defaults' do it 'generates a default width' do expect(subject.width).to eql 0.2 end end describe 'validation' do describe 'header' do it 'does not permit null header' do paragraph_layer_1a1.update_attribute(:header, nil) expect(paragraph_layer_1a1).to have(1).error_on(:header) end end describe 'body' do it 'does not permit null body' do paragraph_layer_1a1.update_attribute(:body, nil) expect(paragraph_layer_1a1).to have(1).error_on(:body) end end end describe 'defaults' do it 'sets default font color of fff' do expect(subject.color).to eql 'fff' end it 'sets default width to 20%' do expect(subject.width).to eql 0.20 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flms-0.9.0 | spec/models/paragraph_layer_spec.rb |
flms-0.1.0 | spec/models/paragraph_layer_spec.rb |