From 7e47e194ecc0056433ab7eab2a385a67747e3959 Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Mon, 3 Sep 2012 23:37:43 -0700 Subject: [PATCH] hack to make running input plugins --- spec/test_utils.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/test_utils.rb b/spec/test_utils.rb index 2ac6f6e24..42c77d016 100644 --- a/spec/test_utils.rb +++ b/spec/test_utils.rb @@ -48,6 +48,16 @@ module LogStash end end # def sample + def input(&block) + require "logstash/config/file" + config = LogStash::Config::File.new(nil, @config_str) + agent = LogStash::Agent.new + it "looks good" do + inputs, filters, outputs = agent.instance_eval { parse_config(config) } + block.call(inputs) + end + end # def input + def agent(&block) @agent_count ||= 0 require "logstash/agent"