Updates unit test to add communicator field to vm_config in spec_helper.rb and fixes if defined check