Sha256: 635e05ec65ab5d466f4bbe698c8a96040614f247cc64541a89dd9bb2de6a7cd6

Contents?: true

Size: 620 Bytes

Versions: 2

Compression:

Stored size: 620 Bytes

Contents

require 'spec_helper'

describe Fluent::Format::Format do
  let(:subject) { Fluent::Format.format(config) }

  context "valid" do
    let(:config) { StringIO.new(%[<match>\ntype stdout\n</match>]) }
    it { should == %[<match>\n  type stdout\n</match>] }
  end

  context "syntax error" do
    let(:config) { StringIO.new(%[<source>\ntype stdout\n</match>]) }
    it { expect { subject }.to raise_error(Fluent::ConfigParseError) }
  end

  context "plugin error is not checked" do
    let(:config) { StringIO.new(%[<match>\ntype foobar\n</match>]) }
    it { should == %[<match>\n  type foobar\n</match>] }
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-format-0.2.2 spec/fluent/format/format_spec.rb
fluent-format-0.2.1 spec/fluent/format/format_spec.rb