Methods
- P
Instance Public methods
# File activesupport/lib/active_support/testing/pending.rb, line 13 13: def pending(description = "", &block) 14: if defined?(::MiniTest) 15: skip(description.blank? ? nil : description) 16: else 17: if description.is_a?(Symbol) 18: is_pending = $tags[description] 19: return block.call unless is_pending 20: end 21: 22: if block_given? 23: failed = false 24: 25: begin 26: block.call 27: rescue Exception 28: failed = true 29: end 30: 31: flunk("<#{description}> did not fail.") unless failed 32: end 33: 34: caller[0] =~ (/(.*):(.*):in `(.*)'/) 35: @@pending_cases << "#{$3} at #{$1}, line #{$2}" 36: print "P" 37: 38: @@at_exit ||= begin 39: at_exit do 40: puts "\nPending Cases:" 41: @@pending_cases.each do |test_case| 42: puts test_case 43: end 44: end 45: end 46: end 47: end