bolshakov / stoplight

:traffic_light: Traffic control for code.
http://bolshakov.github.io/stoplight/
MIT License
384 stars 40 forks source link

Do not use the same error instance for tests #177

Closed bolshakov closed 1 year ago

bolshakov commented 1 year ago

Before this change, the tests used the same failure instance to test the red and yellow states. Instead of a list, we want to store errors in a set (https://github.com/bolshakov/stoplight/pull/172).

Each error serializes into a JSON string. Thus, storing two instances of the same failure in a set will result in just one instance being saved. So to accommodate these changes, I updated the specs to use different error instances.