Last active
September 25, 2015 00:13
-
-
Save arthurnn/99d25007e2ba8f7d77a4 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
require 'minitest/autorun' | |
class FooTest < Minitest::Test | |
def self.before_tests | |
puts "BEFORE!!!" | |
end | |
def self.after_tests | |
puts "AFTER!!!" | |
end | |
(1..10).each { |x| define_method("test_x#{x}") { assert true } } | |
def self.run *args | |
before_tests | |
super | |
ensure | |
after_tests | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment