Sha256: a4b76f838df6756b84262f6cf96b8bf70cfa0605a5660b1a3ae3c2e938f50d9f

Contents?: true

Size: 588 Bytes

Versions: 2

Compression:

Stored size: 588 Bytes

Contents

require 'fluent/test'
require 'fluent/plugin/out_raven_decoder'

# Disable Test::Unit
module Test::Unit::RunCount; def run(*); end; end

RSpec.configure do |config|
  config.before(:all) do
    Fluent::Test.setup
  end
end

def run_driver(options = {})
  prefix = options[:prefix] || 'decoded'
  tag = options[:tag] || 'raven.error'

  fluentd_conf = <<-EOS
type raven_decoder
prefix #{prefix}
  EOS

  tag = options[:tag] || 'raven.error'
  driver = Fluent::Test::OutputTestDriver.new(Fluent::RavenDecoderOutput, tag).configure(fluentd_conf)

  driver.run do
    yield(driver)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-plugin-raven-decoder-0.1.1 spec/spec_helper.rb
fluent-plugin-raven-decoder-0.1.0 spec/spec_helper.rb