Method: Minitest::Spec::DSL#after
- Defined in:
- lib/minitest/spec.rb
#after(_type = nil, &block) ⇒ Object
Define an ‘after’ action. Inherits the way normal methods should.
NOTE: type
is ignored and is only there to make porting easier.
Equivalent to Minitest::Test#teardown.
206 207 208 209 210 211 |
# File 'lib/minitest/spec.rb', line 206 def after _type = nil, &block define_method :teardown do self.instance_eval(&block) super() end end |