I have a seeds.rb
file like
User.create(name: "Lando")
User.create(name: "Vader")
if User.all.count < 2
raise 'hell'
end
that if/raise block is there for testing, because I have been unable to see these entities appear in my database at the beginning of my RSpec tests.
I see the raise happen every time I do bin/rails db:reset
.
I may be missing some point of how the seeding thing works, but how can I go about entering these entities persistently? I can see of course that the code is being run because that crash occurs (which is weird on its own), but I haven't found a way (spec, or like this) to assert in CI that the change I made is working the way I intend short of a very heavyweight test. Since I would like to make relatively complex assertions about how other code treats these entities, I need to be able to see them appear during normal controller tests.