How do I effectively force Minitest to run my tests in order?

前端 未结 5 1244
走了就别回头了
走了就别回头了 2021-01-18 04:34

I know. This is discouraged. For reasons I won\'t get into, I need to run my tests in the order they are written. According to the documentation, if my test class (we\'ll c

5条回答
  •  抹茶落季
    2021-01-18 05:06

    If you just add test_order: alpha to your test class, the tests will run in order:

    class TestHomePage
    
    def self.test_order
     :alpha
    end
    
    def test_a
     puts "a"
    end
    
    def test_b
     puts "b"
    end
    
    end 
    

提交回复
热议问题