更新时间:2023-02-12 16:38:00
应改为FactoryGirl.create.显然,Factory已过时,现在已被删除,请查看您提供的链接中的注释:)
FactoryGirl.create
Factory
It should be FactoryGirl.create instead. Apparently Factory was deprecated and now has been removed, look at the comments in the link you provided :)
Rails 3.2、RSpec、工厂女孩:NameError:未初始化的常量工厂
rspec 测试抛出未初始化的常量 Rails (NameError)
Rails 3.2,RSpec,Factory Girl:NameError:未初始化的常量Factory