1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/spec/factory_girl_spec.rb
2011-08-19 17:21:14 -04:00

22 lines
657 B
Ruby

require "spec_helper"
describe FactoryGirl do
let(:factory) { FactoryGirl::Factory.new(:object) }
let(:sequence) { FactoryGirl::Sequence.new(:email) }
let(:trait) { FactoryGirl::Trait.new(:admin) }
it "finds a registered factory" do
FactoryGirl.register_factory(factory)
FactoryGirl.factory_by_name(factory.name).should == factory
end
it "finds a registered sequence" do
FactoryGirl.register_sequence(sequence)
FactoryGirl.sequence_by_name(sequence.name).should == sequence
end
it "finds a registered trait" do
FactoryGirl.register_trait(trait)
FactoryGirl.trait_by_name(trait.name).should == trait
end
end