I have huge number of constants to be used during testing which I have in seed. So how is it possible to run seed during testing as well specially rspec/cucumber. It's been mentioned that I should better use fabricator or factory girl to populate the data. But I have huge number of constants, so I will have to manually add them to factory(that will be tedius). Plus I have lots of associated data. So is it a good option? Suggestions?
Asked
Active
Viewed 198 times
1
-
Why don't you just drop them in spec_helper.rb? I don't do rspec, but that's how I'd go about it. – Julio Santos Nov 18 '11 at 08:35
-
Actually it's not just some constants but objects, around 100 of them – rajan sthapit Nov 18 '11 at 08:57
-
awesome answer here: http://stackoverflow.com/questions/1898782/prevent-rails-test-from-deleting-seed-data – apneadiving Nov 18 '11 at 10:04