Use more meaningful variable name

tmp    ->
params
This commit is contained in:
yoshihara 2015-04-23 14:59:45 +09:00
parent 874efd1f32
commit 5e1627ca6f

View File

@ -5,16 +5,16 @@ describe RegexpPreview::MultiLine do
subject { RegexpPreview::MultiLine.new(File.expand_path("./spec/support/fixtures/error0.log", Rails.root), "multiline", params).matches_json } subject { RegexpPreview::MultiLine.new(File.expand_path("./spec/support/fixtures/error0.log", Rails.root), "multiline", params).matches_json }
let :params do let :params do
tmp = { params = {
format_firstline: ".+", format_firstline: ".+",
time_format: "time_format", time_format: "time_format",
} }
tmp["format1"] = "(?<foo>foo)" params["format1"] = "(?<foo>foo)"
tmp["format2"] = "(?<bar>bar)" params["format2"] = "(?<bar>bar)"
3.upto(Fluentd::Setting::InTail::MULTI_LINE_MAX_FORMAT_COUNT) do |i| 3.upto(Fluentd::Setting::InTail::MULTI_LINE_MAX_FORMAT_COUNT) do |i|
tmp["format#{i}"] = "" params["format#{i}"] = ""
end end
{ params: tmp } { params: params }
end end
it 'should not have regexp and time_format in [:params][:setting]' do it 'should not have regexp and time_format in [:params][:setting]' do