assertEquals( CompatVersion.RUBY1_9, factory.getRubyVersion() );
}
@Test
public void testDeploymentWithJITCompileMode() throws Exception {
MockDeploymentPhaseContext phaseContext = createPhaseContext();
MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();
RubyRuntimeMetaData metaData = new RubyRuntimeMetaData();
metaData.setCompileMode( RubyRuntimeMetaData.CompileMode.JIT );
unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, metaData );
RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "foo");
rubyAppMetaData.attachTo( unit );
deploy( phaseContext );
ServiceName factoryServiceName = CoreServices.runtimeFactoryName( unit );
MockServiceBuilder<?> factoryBuilder = phaseContext.getMockServiceTarget().getMockServiceBuilder( factoryServiceName );
Value<?> factoryValue = factoryBuilder.getValue();
RubyRuntimeFactory factory = (RubyRuntimeFactory) factoryValue.getValue();
assertNotNull( factory );
assertEquals( CompileMode.JIT, factory.getCompileMode() );