Sha256: 5078f8e65456d3d969126c2b1014e9a4f9ccdea210ae88089e17adc0eef66cfb
Contents?: true
Size: 857 Bytes
Versions: 1
Compression:
Stored size: 857 Bytes
Contents
require 'spec_helper' describe Fluent::Format::Check do let(:plugin_dir) { File.expand_path('../../../example', File.dirname(__FILE__)) } let(:subject) { Fluent::Format.check(config, plugin_dir) } 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 context "param error" do let(:config) { StringIO.new(%[<match>\ntype example\nparam bad\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.2 | spec/fluent/format/check_spec.rb |