Reputation: 15985
We are working on migrating Rails application from 2.3 to 3. The tests are written using minitest. There are many errors in the tests itself so as we fix some errors, we have more number of assertions to test. We would have correct number of assertions if we fix all errors.
But is there any way we can get total number of assertions written even if there are errors in tests?
Upvotes: 0
Views: 129
Reputation: 8984
Each test will stop at the first assertion that fails. So if you have more than one assertion in a test the number will grow as the earlier assertions start to pass.
The number of assertions shows is the number of assertions that were executed, not the number in the test code. There is no way that I am aware of to get the number of assertions in the test code, regardless of passing or not. Why do you want this? What are you hoping to learn from this?
Upvotes: 1