Sha256: e599d44e57a5cbad50bb4ecc27f0ec70689a2fa732fa3d649ea1e85ce3bdcee6
Contents?: true
Size: 521 Bytes
Versions: 10
Compression:
Stored size: 521 Bytes
Contents
require 'spec_helper' require 'acceptance/acceptance_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
10 entries across 10 versions & 1 rubygems