On Mon, Mar 31, 2008 at 6:06 PM, Chuck Remes <[EMAIL PROTECTED]> wrote:
>  On Mar 31, 2008, at 4:53 PM, Tim Haines 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?
>
>  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).

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.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to