我安装了
如何修复它?
factory_girl
宝石,当我运行我的测试时,我得到一个错误:
`block in ': 未初始化常量 FactoryGirl (NameError)
这是我的spec_helper.rb
文件:
RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
config.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end
end
如何修复它?
Gemfile
中的任何相关条目吗?这是你完整的spec_helper.rb
吗?这是一个Rails项目吗? - Joe Ferris