I have a dropdown box that is populated using data from the database (via Angular).
I am trying to test it with Capybara and Poltergeist using:
select('San Francisco', from: "user_region")
As the test database starts with a clean DB, the San Francisco option in the database cannot be loaded. How should I populate the dropdown box if I have no DB?
One idea is to run the db:seed from seed.rb but I'd rather rely on less assumptions when I run my tests. Is there a way to use something like Factory Girl?
Thanks,