Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Rob Whittaker
Rob Whittaker
@purinkle@ruby.social  ·  activity timestamp 11 hours ago

The thing about TDD that took me years to understand: it is not about the tests. It is about the design pressure. Writing the test first forces you to consider the interface before the implementation. The tests are a nice side effect.

#Ruby #TDD

A red rectangle labelled "Test" with an arrow pointing to a larger teal rectangle labelled "Design", illustrating how tests shape design. Caption reads "The test shapes the design."
A red rectangle labelled "Test" with an arrow pointing to a larger teal rectangle labelled "Design", illustrating how tests shape design. Caption reads "The test shapes the design."
A red rectangle labelled "Test" with an arrow pointing to a larger teal rectangle labelled "Design", illustrating how tests shape design. Caption reads "The test shapes the design."
  • Copy link
  • Flag this post
  • Block
Remi Mercier
Remi Mercier
@remi@ruby.social  ·  activity timestamp 7 hours ago

@purinkle Yes! And once you wrote a whole spec file to better define the structure, you light just as well convert these into tests.

  • Copy link
  • Flag this comment
  • Block
Rob Whittaker
Rob Whittaker
@purinkle@ruby.social  ·  activity timestamp 3 hours ago

@remi, that's the thing, though. The conversion isn't a second step. The spec is the test. You sit down, you describe what you want the thing to do in plain, honest language. Then you make the computer agree with you. There's no ceremony to it, no grand unveiling. The act of writing it down is the act of thinking it through. People treat the test suite like a cathedral you build after the fact. It's not. It's the scaffolding you think inside.

  • Copy link
  • Flag this comment
  • Block
Remi Mercier
Remi Mercier
@remi@ruby.social  ·  activity timestamp 2 hours ago

@purinkle yup, we agree on this but i might have not expressed myself correctly :)

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.29 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct