Sha256: 5a20cb276f7a74fb6c6aa53835e29f9663a84425fbfc315119193a75a00b5a21
Contents?: true
Size: 450 Bytes
Versions: 11
Compression:
Stored size: 450 Bytes
Contents
require 'spec_helper' describe 'defining methods inside FactoryGirl' do it 'raises with a meaningful message' do define_model('User') expect do FactoryGirl.define do factory :user do def generate_name 'John Doe' end end end end.to raise_error FactoryGirl::MethodDefinitionError, /Defining methods in blocks \(trait or factory\) is not supported \(generate_name\)/ end end
Version data entries
11 entries across 8 versions & 4 rubygems