# @(#) MQMBID sn=mqkoa-L151208.15 su=_G3xYgJ26EeWqUvq4M3I6bA pn=appmsging/ruby/mqlight/spec/mqlight/logging_spec.rb # # # Licensed Materials - Property of IBM # # 5725-P60 # # (C) Copyright IBM Corp. 2015 # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with # IBM Corp. # require 'spec_helper' require 'spec_unsecure_helper' describe Mqlight::Logging do describe 'ffdc' do subject do buffer = StringIO.new begin client = Mqlight::BlockingClient.new('amqp://localhost:5672', id: 'unit_test_client') logger = Mqlight::Logging::MqlightLogger.new(buffer) fail Mqlight::InternalError, 'unit test exception' rescue Mqlight::InternalError => ffdc_exception logger.ffdc('unittest', 1, client, 'unit test data', ffdc_exception) end buffer.string end it { should include 'unit test data' } it { should include 'unit_test_client' } it { should include '#' } end end