stackbuilders / hspec-golden

Golden tests with Hspec
MIT License
23 stars 8 forks source link

Display difference in the error output of the test #7

Closed CristhianMotoche closed 5 years ago

CristhianMotoche commented 5 years ago

I decided to delegate the user to choose the way in which the output is going to be encoded if the test fails. For the defaultGolden the users would use the Show of String. However, they can change it if they want. For instance, in the example example/html I used pString from pretty-simple to display the error.

The following screenshot shows at the beginning a display of the string comparison using show in the other case I used pString:

image