lib/pork/imp.rb in pork-1.2.3 vs lib/pork/imp.rb in pork-1.2.4
- old
+ new
@@ -23,11 +23,11 @@
executor.module_eval(&suite)
@tests << [:describe, executor]
end
def would desc=:default, opts={}, &test
- @tests << [:would, desc, test, opts]
+ @tests << [:would, desc, test || lambda{}, opts]
end
def execute mode, *args
require "pork/mode/#{mode}"
if args.size == 1 || mode.to_s != 'sequential'
@@ -65,10 +65,10 @@
case e
when Skip
stat.incr_skips
stat.case_skip
else
- err = [e, description_for("would #{desc}"), test.source_location]
+ err = [e, description_for("would #{desc}"), test]
case e
when Failure
stat.add_failure(err)
stat.case_failed
when Error, StandardError