Before/After Suite when using Ruby MiniTest

前端 未结 8 1070
时光说笑
时光说笑 2020-12-09 07:30

Is there an alternative to RSpec\'s before(:suite) and after(:suite) in MiniTest?

I suspect that a custom test runner is in order, however

8条回答
  •  误落风尘
    2020-12-09 08:04

    There are setup() and teardown() methods available. The documentation also lists before() and after() as being available.

    Edit: Are you looking to run something before each test or before or after the whole suite is finished?

提交回复
热议问题