tested ◦ In a framework such as Rails ◦ At a different level (integration testing controllers) • Exploratory code (spikes) • Textual content that will likely change • Poor requirements • External Web Services (FakeWeb) http://rubyrogues.com/what-not-to-test/
up front • Better design through repetative red, green, refactor cycles • You can't write failing tests with passing code • Existing code can be harder to test
as the end user • Collaboration betweeen developers and stakeholders • Requirements => Acceptance + Unit Tests • BDD is a mindset as much as a technique Behavior Driven Development 101
User Story: As someone without a user account I want to create a new account So that I can sign into the application Acceptance Test: User signs up for account, receives email, and can log into account.
steps • Avoid sharing state between steps • Changing tests while refactoring may indicate design problems (especially if requirements have not changed) • Refactor! • Think as the end user