Class: Test::Unit::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/tending/pending.rb

Class Method Summary collapse

Class Method Details

.pending(desc) ⇒ Object

allows creation of pending tests inside Test::Unit::TestCase



5
6
7
8
9
10
# File 'lib/tending/pending.rb', line 5

def self.pending(desc)
  @@pending_tests ||= {}
  caller_file = File.expand_path(caller.first.split(':').first)
  @@pending_tests[caller_file] ||= []
  @@pending_tests[caller_file] << desc
end

.pending_testsObject

return hash of files and associated pending tests



13
14
15
# File 'lib/tending/pending.rb', line 13

def self.pending_tests
  @@pending_tests ||= {}
end