lib/pork/report.rb in pork-1.4.4 vs lib/pork/report.rb in pork-1.5.0
- old
+ new
@@ -13,25 +13,53 @@
def case_pass ; io.print msg_pass ; end
def case_skip ; io.print msg_skip ; end
def case_failed ; io.print msg_failed ; end
def case_errored; io.print msg_errored; end
+ def loaded at, files
+ elapsed = Time.now - at
+ delta = $LOADED_FEATURES.size - files
+ io.printf("Loaded %s files in %s seconds, %s files/s\n",
+ *loadings([delta, elapsed.round(6),
+ (delta / elapsed).round(4)]))
+ io.puts
+ end
+
+ def prepare paths
+ end
+
def report stat
io.puts
io.puts messages(stat)
io.printf("\nFinished in %s seconds, %s tests/s, %s assertions/s \n",
- *velocity(stat))
+ *velocity(stat.velocity))
io.printf("%s tests, %s assertions, %s failures, %s errors, %s skips\n",
- *numbers(stat))
+ *numbers(stat.numbers))
end
private
- def velocity stat
- stat.velocity
+ def loadings values
+ values
end
- def numbers stat
- stat.numbers
+ def velocity values
+ values
+ end
+
+ def numbers values
+ values
+ end
+
+ def ok text
+ text
+ end
+
+ def bad text
+ text
+ end
+
+ def time text
+ text
end
def messages stat
stat.exceptions.reverse_each.map do |(err, msg, test, seed)|
"\n #{show_command(test.source_location, seed)}" \