maigen/testing_practice — pull request #8 by maigen (2014-05-06 18:10:12+00:00)
Title: add integration testing for Setting a Wedding Budget with 1 Contributor

I feel like these tests are going to get a moderate to minimal look of disapproval. Here's why:

There's a lot of what you'll consider unnecessary assertions, namely the parts that say page.should have_content. I think you'll make me take them out later, but for right now, the direct the flow of the form that the user is filling out. Maybe you won't make me take them out because without them, there's no real story... (I guess what I'm trying to say is I have no idea what you're going to say!)

Because I was more concerned with writing tests, I wrote all these after sketching (by hand) what I thought the page might look like as the MVP. It is literally a page that helps the user set a budget. That's it. Then I wrote tests as if a user was visiting the page and interacting with it. Maureen looked it over and agreed that while the tests aren't perfect, I should go ahead and see what you think.

They're red, obviously. I'm going to write the /budget.html.erb page and build the bits of form that are needed. They should turn green with some work. And then, maybe you'll be awake and can nudge me toward my glorious refactor and eventual perfect, ready-to-merge branch.

Whee!

Thank you. That reply last night was SUPER helpful. I may even turn it into a blog post.