Skip to content

Commit

Permalink
use power_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
sonots committed Sep 15, 2017
1 parent 87801aa commit 2d4a705
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/plugin/test_filter_flowcounter_simple.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_filter
d = create_driver
filtered, out = filter(d, msgs)
assert_equal msgs, filtered
assert( out.include?("count:20"), out )
assert { out.include?("count:20") }
end

private
Expand Down
6 changes: 3 additions & 3 deletions test/plugin/test_out_flowcounter_simple.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_num
end
end
out = capture_log(d1.instance.log) { d1.instance.flush_emit(60) }
assert( out.include?("count:30"), out )
assert { out.include?("count:30") }
end

def test_byte
Expand All @@ -51,7 +51,7 @@ def test_byte
end
end
out = capture_log(d1.instance.log) { d1.instance.flush_emit(60) }
assert( out =~ /count:\d+\tindicator:byte\tunit:second/, out )
assert { out =~ /count:\d+\tindicator:byte\tunit:second/ }
end

def test_comment
Expand All @@ -64,6 +64,6 @@ def test_comment
end
end
out = capture_log(d1.instance.log) { d1.instance.flush_emit(60) }
assert( out.include?("comment:foobar"), out )
assert { out.include?("comment:foobar") }
end
end

0 comments on commit 2d4a705

Please sign in to comment.