← Back to Upcase

Ship A Feature: Supporting Markdown


(Upcase ) #1
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

(Geoff Harcourt) #2

I didn’t realize you could put a do - end block on a shared example, that’s a great trick.


(Juanito Fatas) #3

The pull request is a private repo.


(Andy Waite) #4

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!).


(Ben Orenstein) #5

Oops, you’re right. Sorry about that.

The good news is we’ll be opening that repo to subscribers soon.


(Rafael George) #6

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:


(Renan Gurgel) #7

The pull request link is broken


(Ben Orenstein) #8

Correct. That repo is closed-source for now, but we’ll be opening it to you all soon.


(Ben Orenstein) #9

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).


(Rafael George) #10

@benorenstein Do you have some heuristic on when to use the presenters and when not?

Regards,


(Ben Orenstein) #11

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.