librelist archives

« back to archive

[shoes4] code style for specs - "it" instead of "specify"

[shoes4] code style for specs - "it" instead of "specify"

From:
Peter Fitzgibbons
Date:
2012-09-26 @ 11:45
HI Folks,

There is a mix of 'it' vs 'specify' in the specs, seems to be weighted
significantly toward 'it'.   Also 'it' is favored in the Rspec DSL in other
methods such as the short-form #its and #it_behaves_like.

Could I hear any objections to focusing on 'it' usage moving forward?

Shoes On

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com

Re: [shoes] [shoes4] code style for specs - "it" instead of "specify"

From:
Eric Watson
Date:
2012-09-26 @ 14:26

On Sep 26, 2012, at 6:45 AM, Peter Fitzgibbons 
<peter.fitzgibbons@gmail.com> wrote:

> Could I hear any objections to focusing on 'it' usage moving forward?

My habit is to use 'it' and 'specify' interchangeably, to make the spec 
read properly. So if I am specifying the behavior of the object under 
test, I use 'it'. If I am specifying some other behavior, I use 'specify'.

This allows each spec to read naturally, but I can see how it could be 
confusing. I defer to the will of the group. 

Eric

Re: [shoes] [shoes4] code style for specs - "it" instead of "specify"

From:
Steve Klabnik
Date:
2012-09-26 @ 14:40
I personally use 'it' everywhere, but I don't have super strong
feelings. I like Eric's thoughts.

Re: [shoes] [shoes4] code style for specs - "it" instead of "specify"

From:
David Eastman
Date:
2012-09-26 @ 16:28
I'm an "it" guy

On Wed, Sep 26, 2012 at 3:40 PM, Steve Klabnik <steve@steveklabnik.com>wrote:

> I personally use 'it' everywhere, but I don't have super strong
> feelings. I like Eric's thoughts.
>

Re: [shoes] [shoes4] code style for specs - "it" instead of "specify"

From:
Victor Goff
Date:
2012-09-27 @ 01:17
I don't mind either way.  It is Ruby.  If you want 'that' then just alias
'it'.  If you take 'specify' out but still need it, for some reason.
 Unless you are asking because you are thinking to use 'specify' for some
other purpose.

Re: [shoes] [shoes4] code style for specs - "it" instead of "specify"

From:
Peter Fitzgibbons
Date:
2012-09-27 @ 11:05
Not really a question of technology.  More a question of personal opinion +
team dynamics + DSL.

Sounds like we more or less agree to 'it'.

So, going forward, if you find yourself waffling on 'it' vs 'specify', or
just don't care.. then choose 'it'  :)
And if you're refactoring something peppered with specify, go ahead and
change 'em.

Shoes On!

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com


On Wed, Sep 26, 2012 at 8:17 PM, Victor Goff <keeperotphones@gmail.com>wrote:

> I don't mind either way.  It is Ruby.  If you want 'that' then just alias
> 'it'.  If you take 'specify' out but still need it, for some reason.
>  Unless you are asking because you are thinking to use 'specify' for some
> other purpose.