Why won't my rails spec run?
问题 When I try to run my spec, I get an uninitialized constant error. My spec looks like this: 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 The error is: facility_spec.rb:1:in `<top (required)>': uninitialized constant Facility (NameError) I certainly have a Facility model, so I'm not sure why this would happen. 回答1: You should try running rake spec instead