Method: Minitest::Test#run

Defined in:
lib/minitest/test.rb

#runObject

Runs a single test with setup/teardown hooks.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/minitest/test.rb', line 100

def run
  with_info_handler do
    time_it do
      capture_exceptions do
        before_setup; setup; after_setup

        self.send self.name
      end

      %w{ before_teardown teardown after_teardown }.each do |hook|
        capture_exceptions do
          self.send hook
        end
      end
    end
  end

  self # per contract
end