pezra / rspec-mode

An RSpec minor mode for Emacs
257 stars 112 forks source link

Add spexp snippet #120

Closed pezra closed 9 years ago

pezra commented 9 years ago

snippet for specify { expect(...).to ... }

dgutov commented 9 years ago

It's your project, but I'd rather we had small separate snippets for each construct. There is one for expect already, and the specify would be similar to the it snippet (of it which specify is an alias).

pezra commented 9 years ago

Hmmm, interesting idea. OTOH we have itiexp which seems analogous to this. I see the argument for a separate specify snippet but it is not a construct I use without immediately following it with expect. Since no one else has added/requested it perhaps no one uses it? I'll play with t two separate snippets and see how I like it, though.

dgutov commented 9 years ago

OTOH we have itiexp which seems analogous to this.

Yup. I'd remove it, if it were only up to me.

I see the argument for a separate specify snippet but it is not a construct I use without immediately following it with expect.

I see. But for the record, on a few occasions I've used it simply when the message doesn't fit the "it" verb (so, not for one-liners). And there are some similar usages in the Pry and Grape spec suites.