Risky Tests

#1

I came across a feature of PHPUnit that might be helpful to include in the Crystal spec runner. The concept of risky tests.

I wanted to gather some feedback on if this would be something that should be added to the standard library, or would be better suited to a shard, like ameba.

The main concept of it, would be test cases that do not have any assertions, i.e. an it block with no should or should_not matchers.

..R

Finished in 16.23 milliseconds
3 examples, 0 failures, 0 errors, 0 pending, 1 risky

Running crystal spec with such a test, could result in something like that. The spec itself would not fail, but would be designated with a R to indicate it as risky.

1 Like

#2

If you have a simple way to detect that a test has no assertions then I see it as something good. But how do you implement it?

0 Likes

#3

Dunno yet, didn’t get that far.

I’ll see if I can come up with something.

0 Likes