Live data from Hacker News

Spec-me-maybe: Introduces the “maybe” syntax to RSpec

github.com

31–40 of 42 posts

Re: Spec-me-maybe: Introduces the “maybe” syntax to RSpec

#33

This has to be a joke. I'm fond of TDD just as much as the next person, but seriously, some of you RSpec fanatics have lost your minds.

Sorry, it has to be said: After some inspection, maybe it passes for a joke.

Maybe.

Re: Spec-me-maybe: Introduces the “maybe” syntax to RSpec

#34

I find it quite funny that people cannot tell whether this is a joke or not, just says something about the state of things...

It does. Especially considering the fact that RSpec itself was created as a joke solution to the "I wish my tests were more human readable" meme several years ago. Hopefully that sheds some light on why some of us might be hyper-sensitive about it.

Re: Spec-me-maybe: Introduces the “maybe” syntax to RSpec

#36

I find it quite funny that people cannot tell whether this is a joke or not, just says something about the state of things...

It does. Especially considering the fact that RSpec itself was created as a joke solution to the "I wish my tests were more human readable" meme several years ago. Hopefully that sheds some light on why some of us might be hyper-sensitive about it.

That's not quite true.

I created RSpec (in early 2005) to draw people's attention away from the word "test" because it was a huge hangup while I was teaching TDD. I kept hearing "You can't test something that doesn't exist, therefore your entire idea is bunk." I wanted to introduce TDD to people without ever using the word "test", and then switch them to using xUnit instead.

Not a joke, but I guess you could reasonably describe RSpec as a tool for performing a good old fashioned bait and switch. In a classroom. (I never intended for it to be used outside of a classroom setting.)

Around the time I was looking for ways to "teach TDD without using the word", Aslak Hellesøy introduced me to Dan North's ideas of Behaviour Driven Development. That's where the word "should" came from. I don't know if it was actually Aslak or Dan (or possibly even Liz Keogh) that first used the word "should", but that wasn't my idea.

Also, I'll point out that mixing #should onto Object wasn't my fault. The original syntax looked very close to the expect().to() syntax of today. It was actually assert(foo).does_equal(bar) at one point, and this was the syntax I was most fond of. I tried dozens of different combinations. "#should" was one of many, and I didn't like it. It got released this way because I was talked into it after that variant was demonstrated (by someone else) to a positive audience.

People liked it. RSpec took off. Whoops.

I later said on twitter, jokingly, that RSpec was a huge troll. That was kind of a joke on a joke. RSpec wasn't a joke, but I didn't build it for actual use. That was a happy accident. That said, it's a great tool these days, if a bit heavy. And it has certainly served my original wish of teaching many people TDD very well.

My $0.02 on the "maybe" syntax: if you need this, I suspect your problems are a lot larger than whether or not an assertion will pass or fail. It's symptom solving.

Re: Spec-me-maybe: Introduces the “maybe” syntax to RSpec

#37

I find it quite funny that people cannot tell whether this is a joke or not, just says something about the state of things...

It does. Especially considering the fact that RSpec itself was created as a joke solution to the "I wish my tests were more human readable" meme several years ago. Hopefully that sheds some light on why some of us might be hyper-sensitive about it.

I'd like to thank Jesse Cooke for pointing me at this. The history of RSpec is something that's often misunderstood by many folks.

Re: Spec-me-maybe: Introduces the “maybe” syntax to RSpec

#38
post #37

Earlier quoted context omitted.

It does. Especially considering the fact that RSpec itself was created as a joke solution to the "I wish my tests were more human readable" meme several years ago. Hopefully that sheds some light on why some of us might be hyper-sensitive about it.

I'd like to thank Jesse Cooke for pointing me at this. The history of RSpec is something that's often misunderstood by many folks.

My pleasure ;) I'll go update the wiki.

Updated: https://github.com/rspec/rspec/wiki/Background

Re: Spec-me-maybe: Introduces the “maybe” syntax to RSpec

#39
post #36

Earlier quoted context omitted.

It does. Especially considering the fact that RSpec itself was created as a joke solution to the "I wish my tests were more human readable" meme several years ago. Hopefully that sheds some light on why some of us might be hyper-sensitive about it.

That's not quite true. I created RSpec (in early 2005) to draw people's attention away from the word "test" because it was a huge hangup while I was teaching TDD. I kept hearing "You can't test something that doesn't exist, therefore your entire idea is bunk." I wanted to introduce TDD to people without ever using the word "test", and then switch them to using xUnit instead. Not a joke, but I guess you could reasonab…

Thank you for this. It's nice to have it straight from the horses mouth instead of the many different types of RSpec folklore I've heard about its origin.

Re: Spec-me-maybe: Introduces the “maybe” syntax to RSpec

#40
post #36

Earlier quoted context omitted.

It does. Especially considering the fact that RSpec itself was created as a joke solution to the "I wish my tests were more human readable" meme several years ago. Hopefully that sheds some light on why some of us might be hyper-sensitive about it.

That's not quite true. I created RSpec (in early 2005) to draw people's attention away from the word "test" because it was a huge hangup while I was teaching TDD. I kept hearing "You can't test something that doesn't exist, therefore your entire idea is bunk." I wanted to introduce TDD to people without ever using the word "test", and then switch them to using xUnit instead. Not a joke, but I guess you could reasonab…

Author of spec-me-maybe here. My $0.02 cents on the "maybe" syntax would be please don't actually use it.
Post reply on HN