Ship A Feature: Supporting Markdown

By popular demand, Ben and Joe return with the "Ship A Feature" series. This time, they add Markdown support to the comment field for Learn's exercises. The pull request Previous Ship A Feature
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.

1 Like

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 :slight_smile:

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.

1 Like