Given .. and .. - And requires capitalisation

Hi Guys,

Just writing out a plain English story and was surprised to see one of
my
steps wasn’t listed as pending. It turned out it was because I had
started
the line with and instead of And. Is there any reason why and shouldn’t
be
an alias for And?

Tim.

On Mar 31, 2008, at 4:53 PM, Tim H. wrote:

Hi Guys,

Just writing out a plain English story and was surprised to see one
of my steps wasn’t listed as pending. It turned out it was because
I had started the line with and instead of And. Is there any reason
why and shouldn’t be an alias for And?

Tim,

I would get it is because ‘and’ (lower case) is a reserved word in
Ruby. Note that all of these commands are uppercase. I don’t think
they can alias ‘and’ without potentially breaking lots of valid ruby
code (not everyone uses ‘&&’ for ‘and’ exclusively).

cr

On Mon, Mar 31, 2008 at 6:06 PM, Chuck R. [email protected]
wrote:

they can alias ‘and’ without potentially breaking lots of valid ruby
code (not everyone uses ‘&&’ for ‘and’ exclusively).

Additionally, ‘when’ and ‘then’ are Ruby keywords. This is the reason
that all the methods are uppercase in Ruby, and they are the same in
plain text for consistency.

Cool. I didn’t know about and and Ruby. :slight_smile:

thanks!

I don’t know how the plain text stories are parsed, but would it be
reasonable to expect that if they are “plain text” rather than ruby,
then
lower case ‘and’ could be used interchangeably? Is consistency really
required here? I’m thinking I would like other people writing stories
for
me in the future, and this seems like it would just be another PITA
thing to
fix after receiving stories from them… And at the moment if not fixed,
they’ll just be silently ignored (v1.1.3) - which seems baaad.

Tim.

On Mar 31, 2008, at 6:29 PM, “Tim H.” [email protected] wrote:

I don’t know how the plain text stories are parsed, but would it be
reasonable to expect that if they are “plain text” rather than ruby,
then lower case ‘and’ could be used interchangeably? Is
consistency really required here? I’m thinking I would like other
people writing stories for me in the future, and this seems like it
would just be another PITA thing to fix after receiving stories from
them… And at the moment if not fixed, they’ll just be silently
ignored (v1.1.3) - which seems baaad.

Agreed that silent ignorance ™ is bad but before we address this
there are a few other issues that we need to adress first. Formal
means of identifying commentary and multiline text to name two.

Please feel free to put a ticket in at http://rspec.lighthouseapp.com
if you want to ensure this stays ok the radar.

Cheers,
David