require 'rubygems'
require 'yaml'
require 'rspec'

# Add ext/ to the load path so we can load `hermann_lib`
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../ext/'))
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib/'))

require 'hermann'

RSpec.configure do |c|
  c.color = true
  c.formatter = :documentation

  shared_context 'integration test context', :type => :integration do
    let(:topic) { "hermann_testing_" + rand(100_000_000).to_s }
    let(:brokers) { $integrationconf['kafka']['brokers'] }
    let(:zookeepers) { $integrationconf['zookeepers'] }
  end
end

integration_config = File.expand_path(File.dirname(__FILE__) + '/fixtures/integration.yml')
if File.exists?(integration_config)
  $integrationconf = YAML.load_file(integration_config)
end

require 'rubygems'
require 'yaml'
require 'rspec'

# Add ext/ to the load path so we can load `hermann_lib`
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../ext/'))
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib/'))

require 'hermann'

RSpec.configure do |c|
  c.color = true
  c.formatter = :documentation

  shared_context 'integration test context', :type => :integration do
    let(:topic) { "hermann_testing_" + rand(100_000_000).to_s }
    let(:brokers) { $integrationconf['kafka']['brokers'].join(',') }
    let(:zookeepers) { $integrationconf['zookeepers'] }
  end
end

integration_config = File.expand_path(File.dirname(__FILE__) + '/fixtures/integration.yml')
if File.exists?(integration_config)
  $integrationconf = YAML.load_file(integration_config)
end

Fix TypeError conversion of Array into String
Fix TypeError conversion of Array into String

When running rake spec:integration with /fixtures/integration.yml

Hermann::Lib::Producer #connect should connect
     Failure/Error: subject(:producer) { Hermann::Lib::Producer.new(brokers) }
     TypeError: no implicit conversion of Array into String
     # ./spec/hermann_lib/producer_spec.rb:10:in `initialize'