Rails isolated Engine with dependencies from main_app
===

So I've got an app that consists of a main rails 3.2 app which acts as the base and an admin part, I then got an isolated engine which handles the non logged in part of the site.

So naturally the engines has a lot of dependencies on classes from the main app. This makes it hard to test it in isolation. I've seen an example somewhere of a sort of 'bridge' between the main app and the engine, but I can't remember where.

I guess what I'm really asking is how do you handle these kinds of dependencies, can you minimize them, and how do you test the engine? - As I've understood you run the test from the dummy-app, but since I have a whole lot of dependencies that doesn't work out that well.

Are there any good resources on best practices?