Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以在 Rails 3.0.9 应用程序上,我在 1.9.2 上使用 Spork/Guard/RSpec/FactoryGirl。
我想知道如何让 Spork/Guard 自动更新我的工厂和语言环境。
在你的 Gemfile
gem "factory_girl_rails", :require => false
然后在 spec/spec_helper.rb
Spork.each_run do require 'factory_girl_rails' end
那应该工作
对于语言环境,只需I18n.reload!将each_run. spec/spec_helper.rb它应该工作。
I18n.reload!
each_run
spec/spec_helper.rb