DEV Community

chenge
chenge

Posted on

3

Test Rails Fast and Stable

In this Metz's video RailsConf 2016 - Get a Whiff of This by Sandi Metz, she demoed how to refactor and make test fast and stable by Fake object.

class Foo --> class Sale

Test Foo with fake Sale.

Code is here:

Test Any Slow or Unstable API

You can use this method to test any I think.

Top comments (2)

Collapse
 
andy profile image
Andy Zhao (he/him)

Thanks for sharing, that was a great talk.

Feel free to use the YouTube tag to embed:

# YouTube link: https://www.youtube.com/watch?v=PJjHfa5yxlU
{% youtube PJjHfa5yxlU %}
Collapse
 
chenge profile image
chenge

Thanks.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more