Reputation: 24558
I am trying to build tests using specs, and I am confused about using FactoryGirl or Factory,
I have FactoryGirl 2.3.2 installed, as I have gem "factory_girl_rails", "~> 1.2"
in GemFile
The declaration of Factory is at /home/sam/.rvm/gems/ruby-1.9.3-p0/gems/factory_girl-2.3.2/lib/factory_girl/deprecated.rb
I see Factory used in examples like this: How do I create an association with a has_many :through relationship in Factory Girl?
Any idea please ? is it Ok to use Factory at Rails 3.1 ? not always ? not at all ?
Upvotes: 2
Views: 289
Reputation: 5474
As far as I can understand of deprecation.rb, only methods defined by FactoryGirl (e.g. aliases) are deprecated when using with Factory. I guess you can keep on using Factory.xxxx calls to build/create instances.
Upvotes: 2