Now i got your idea. You're right. but there's a problem of applying your idea.

If you see implementation of ERBEvaluator.eval() method, you'll understand it'll not work with any other ScriptEngine but only with RubyScriptEngine. Very much erb and ruby specific code.
So injecting different scriptEngine to ERBScriptEngine class does not make any sense. That means we need something else than dependency injection.

Fortunately, there's not a single, but multiple way of keeping testable, good architecture.

One option is using OOP concept. If we change ERB to something else in the future, 

we'll create interface Evaluator and let ERBEvaluator and SomthingElseEvaluator both implements Evaluator.
ERBEvaluator will embed Ruby scripting engine inside, SomethingElseEvaluator will embed some scripting engine inside. 
All embedded scripting engine will be hidden from outside. Keeping embedded engine in private is even better for encapsulation.

What do you think this approach?