This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/ship-a-feature-supporting-markdown
I didn’t realize you could put a
do - end block on a shared example, that’s a great trick.
The pull request is a private repo.
I never knew about passing a second argument to
to to give a custom failure message, very useful (even though it didn’t work in this case!).
Oops, you’re right. Sorry about that.
The good news is we’ll be opening that repo to subscribers soon.
Great episode. I have a couple of questions though.
Why don’t you guys use presenters? In that case you will be able to not write view specs, aren’t the write of view specs implies that your views have too much logic?
Aren’t you guys at thoughtbot following the same scheme for commit messages?
Thanks again for your answers and for all the episodes keep them coming
The pull request link is broken
Correct. That repo is closed-source for now, but we’ll be opening it to you all soon.
We do! Sometimes.
In this case, it didn’t feel like we quite needed to reach for a tool that heavy.
I don’t think writing view specs implies that our views are doing too much. I think it’s often the easiest way to test some logic that does belong in the view layer (which, I would argue, markdown formatting does).
@benorenstein Do you have some heuristic on when to use the presenters and when not?
Not really, I’m afraid. It’s more of a feel.
One thing that might trigger it is difficulty testing, like if a view required quite a bit of setup data to test.