Sha256: 559824006a93c20e828304255e8b1c64043779a8e43e08318ed6c9c8ec51bce4
Contents?: true
Size: 476 Bytes
Versions: 201
Compression:
Stored size: 476 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 "uses the correct class name" do should be_kind_of(User) end it "uses the correct factory definition" do should be_admin end end
Version data entries
201 entries across 93 versions & 7 rubygems