Sha256: 687649b03cf4491e3aa3435980c7cb5e65b3fce3628f11aa21bd16a4969fd882
Contents?: true
Size: 705 Bytes
Versions: 13
Compression:
Stored size: 705 Bytes
Contents
require 'spec_helper' describe CustomFields::CustomFieldsFor do describe 'Saving' do before(:each) do @project = Project.new(:name => 'Locomotive') @project.person_custom_fields.build(:label => 'E-mail', :_alias => 'email', :kind => 'String') @project.person_custom_fields.build(:label => 'Age', :_alias => 'age', :kind => 'String') end context '@create' do it 'persists parent object' do lambda { @project.save }.should change(Project, :count).by(1) end it 'persists custom fields' do @project.save && @project.reload @project.person_custom_fields.count.should == 2 end end end end
Version data entries
13 entries across 13 versions & 2 rubygems