assertEquals( RubyRuntimeMetaData.RuntimeType.RACK, runtimeMetaData.getRuntimeType() );
}
@Test
public void testWithExistingTypedRubyRuntimeMD() throws Exception {
RubyAppMetaData rubyAppMetaData = new RubyAppMetaData( "app_name" );
RackMetaData rackAppMetaData = new RackMetaData();
rubyAppMetaData.setRoot( this.root );
MockDeploymentPhaseContext phaseContext = createPhaseContext();
MockDeploymentUnit unit = phaseContext.getMockDeploymentUnit();
RubyRuntimeMetaData originalRuntimeMD = new RubyRuntimeMetaData();
originalRuntimeMD.setRuntimeType( RubyRuntimeMetaData.RuntimeType.BARE );
unit.putAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY, originalRuntimeMD );
rubyAppMetaData.attachTo( unit );
rackAppMetaData.attachTo( unit );
deploy( phaseContext );
RubyRuntimeMetaData runtimeMetaData = unit.getAttachment( RubyRuntimeMetaData.ATTACHMENT_KEY );