ruby-1.9.2-p180 :007 > Factory.define :user do |user|
ruby-1.9.2-p180 :008 > user.email "[email protected]"
ruby-1.9.2-p180 :009?> user.password "foobar"
ruby-1.9.2-p180 :010?> user.password_confirmation "foobar"
ruby-1.9.2-p180 :011?> end
NameError: uninitialized constant Factory
我的Gemfile:的Rails 3 + FactoryGirl:NameError:未初始化的常量廠
group :test do
gem "rspec-rails"
gem 'webrat', '0.7.1'
gem 'spork', '0.9.0.rc4'
gem 'factory_girl_rails'
end
即使艱難,似乎我的一切,因爲它應該,我不斷收到這個錯誤。我也有factories.rb創建。
謝謝
OMG我忘了我有這套! – Chloe 2013-02-27 04:36:56