Subclass TestCase to create your own tests. Typically you’ll want a TestCase subclass per implementation class.
Returns true if the test passed.
# File lib/minitest/unit.rb, line 770 770: def passed? 771: @passed 772: end
Runs the tests reporting the status to runner
# File lib/minitest/unit.rb, line 694 694: def run runner 695: trap 'INFO' do 696: warn '%s#%s %.2fs' % [self.class, self.__name__, 697: (Time.now - runner.start_time)] 698: runner.status $stderr 699: end if SUPPORTS_INFO_SIGNAL 700: 701: result = '.' 702: begin 703: @passed = nil 704: self.setup 705: self.__send__ self.__name__ 706: @passed = true 707: rescue *PASSTHROUGH_EXCEPTIONS 708: raise 709: rescue Exception => e 710: @passed = false 711: result = runner.puke(self.class, self.__name__, e) 712: ensure 713: begin 714: self.teardown 715: rescue *PASSTHROUGH_EXCEPTIONS 716: raise 717: rescue Exception => e 718: result = runner.puke(self.class, self.__name__, e) 719: end 720: trap 'INFO', 'DEFAULT' if SUPPORTS_INFO_SIGNAL 721: end 722: result 723: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.