# File lib/active_support/testing/pending.rb, line 13
13: def pending(description = "", &block)
14: if description.is_a?(Symbol)
15: is_pending = $tags[description]
16: return block.call unless is_pending
17: end
18:
19: if block_given?
20: failed = false
21:
22: begin
23: block.call
24: rescue Exception
25: failed = true
26: end
27:
28: flunk("<#{description}> did not fail.") unless failed
29: end
30:
31: caller[0] =~ (/(.*):(.*):in `(.*)'/)
32: @@pending_cases << "#{$3} at #{$1}, line #{$2}"
33: print "P"
34:
35: @@at_exit ||= begin
36: at_exit do
37: puts "\nPending Cases:"
38: @@pending_cases.each do |test_case|
39: puts test_case
40: end
41: end
42: end
43: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.