Your conclusion and the official release registered on relishapp.com are correct. What happens is that rspec must run after (: each) es after each example, because an exception in after (: each) will cause the example to fail. Before rspec can display an example on the output, it needs to know whether it is green or red, which means that after (: eaches) it is necessary to run before the description of the description appears on the output.
However, if you put the puts statement in your actual example, you will see that before it (in front of it) they will execute (for example, puts), and then (after each) es, as you would expect, and finally, the description of the example is displayed to the screen.
Like you, I was also confused until I realized that rspec, which prints the example label, does not match what it actually does - the label is printed only after all the previous (: all) s, earlier (: each) es, and after (: each) es are launched as an example.
Note: after (: all) s it starts after printing the example label because they do not affect the test result (a warning is generated that the exception occurred in the hook after (: all), but this does not make the test red).
pstare
source share