test/helper.rb in airbrake-3.0.5 vs test/helper.rb in airbrake-3.0.6
- old
+ new
@@ -187,9 +187,23 @@
assert nodes.any?{|node| node.content == content },
"Expected xpath #{xpath} to have content #{content}, " +
"but found #{nodes.map { |n| n.content }} in #{nodes.size} matching nodes." +
"Document:\n#{document.to_s}"
end
+
+ def assert_logged(expected)
+ assert_received(Airbrake, :write_verbose_log) do |expect|
+ expect.with {|actual| actual =~ expected }
+ end
+ end
+
+ def assert_not_logged(expected)
+ assert_received(Airbrake, :write_verbose_log) do |expect|
+ expect.with {|actual| actual =~ expected }.never
+ end
+ end
+
+
end
module DefinesConstants
def setup
@defined_constants = []