Created
May 6, 2013 01:54
-
-
Save kulte/5522956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Runs a single test with setup/teardown hooks. | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment