Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# encoding: utf-8
require "logstash/devutils/rspec/spec_helper"
files = Dir['conf.d/*.conf']
@@configuration = String.new
files.sort.each do |file|
@@configuration << File.read(file)
end
describe "simple test" do
config(@@configuration)
sample(
"message" => "my message",
"type" => "log",
"time" => "2016-12-26T10:58:05.0Z",
"source" => "stdout"
) do
insist { subject.get("type") } == "log"
insist { subject.get("source") } == "stdout"
insist { subject.get("message") } == "my message"
insist { subject.include?("log") } == false
insist { subject.timestamp.to_i } == Time.iso8601("2016-12-26T10:58:05.0Z").to_i
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.