当我尝试运行我的规范时,我得到一个未初始化的常量错误。我的规格如下所示:
describe Facility do
it { should have_many(:units) }
it { should have_many(:facilities_users) }
it { should have_many(:administrators) }
it { should have_many(:facility_employees) }
end
错误是:
facility_spec.rb:1:in `<top (required)>': uninitialized constant Facility (NameError)
我当然有一个 Facility 模型,所以我不确定为什么会发生这种情况。