Method: MiniTest::Spec.before
- Defined in:
- lib/minitest/spec.rb
.before(type = :each, &block) ⇒ Object
Define a ‘before’ action. Inherits the way normal methods should.
NOTE: type is ignored and is only there to make porting easier.
Equivalent to MiniTest::Unit::TestCase#setup.
132 133 134 135 |
# File 'lib/minitest/spec.rb', line 132 def self.before type = :each, &block raise "unsupported before type: #{type}" unless type == :each define_inheritable_method :setup, &block end |