Class: Test::Unit::TestCase
- Inherits:
-
Object
- Object
- Test::Unit::TestCase
- Defined in:
- lib/moonit.rb
Class Method Summary collapse
Class Method Details
.manual_test(name) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/moonit.rb', line 38 def self.manual_test(name) if ENV['MANUAL'] puts "\n" + name yield if block_given? proc = if ask("Passed? ") {|q| q.default = "Y"} =~ /y/i Proc.new {assert true} else reason = ask("Why did this fail? ") Proc.new {assert false, reason} end define_method("test_MANUAL_#{name.gsub(/[^\w]/,'_')}",proc) end end |
.step(description) ⇒ Object
52 53 54 55 |
# File 'lib/moonit.rb', line 52 def self.step(description) ask("#{description} ") yield if block_given? end |