Sha256: 9b2c6fcde6adfcd6ab4227feee7ddd3c76434685721f3bf589b58bb8fcd5a22e
Contents?: true
Size: 389 Bytes
Versions: 16
Compression:
Stored size: 389 Bytes
Contents
require 'spec_helper' describe "an instance generated by a factory with a custom class name" do before do define_model("User", admin: :boolean) FactoryGirl.define do factory :user factory :admin, class: User do admin { true } end end end subject { FactoryGirl.create(:admin) } it { should be_kind_of(User) } it { should be_admin } end
Version data entries
16 entries across 13 versions & 5 rubygems