FactoryGirl screws up rake db:migrate process
问题 I am doing TDD/BDD in Ruby on Rails 3 with Rspec (2.11.0) and FactoryGirl (4.0.0). I have a factory for a Category model: FactoryGirl.define "Category" do factory :category do name "Foo" end end If I drop, create then migrate the database in the test enviroment I get this error: rake aborted! Could not find table 'categories' This problem occurs because FactoryGirl expects the tables to already exist (for some odd reason). If I remove the spec folder from my rails app and do db:migrate , it