RSpec can't find Factorys from Factorygirl
问题 i will use RSpec with Factory girl in my Rails3 Project. I have installed factory girl but it don't find the factorys i have this error Failure/Error: Factory.build(:user).should_be valid No such factory: user spec/factories/user_factory.rb : Factory.define :user do |u| u.username 'otto' end spec/spec_helper.rb ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'factory_girl' Dir[Rails.root.join("spec/support/**/*.rb")]