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?
Git 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?
Regards,
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.