Sha256: 821a1d5aecfc082faa0d515a53728ed1e387ccae7096d88d513aa3f16987a86a

Contents?: true

Size: 580 Bytes

Versions: 1

Compression:

Stored size: 580 Bytes

Contents

require 'spec_helper'

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

  context "valid" do
    let(:config) { StringIO.new(%[<match>\ntype stdout\n</match>]) }
    it { should be_true }
  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" do
    let(:config) { StringIO.new(%[<match>\ntype foobar\n</match>]) }
    it { expect { subject }.to raise_error(Fluent::ConfigError) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-format-0.2.1 spec/fluent/format/check_spec.rb