mercredi 28 septembre 2016

Rails Engine Controller Test

I have a rails engine that I've created to share Model code between two repositories. Their respective controllers live in their respective repositories. I'm trying to test the controllers, using the machinist gem to generate the factories. But when I try to create my factories I get an uninitialized Constant error, which signifies to me that the models from my rails engine aren't getting properly required. I tried to explicitly require the rails engine gem in my spec_helper.rb file, but I got a file not found error then.

Curious if anyone has dealt with this before?

Aucun commentaire:

Enregistrer un commentaire