Conditional statements

17 views
Skip to first unread message

Sasha S

unread,
Jan 29, 2016, 1:25:22 PM1/29/16
to rspec
I am trying to create a conditional block like;
if
 action
elseif
  action
else


I cannot find anywhere the correct way for elseif part of this block.  Is it possible in RSpec?

Thanks,
Sasha

Myron Marston

unread,
Jan 29, 2016, 1:27:19 PM1/29/16
to rs...@googlegroups.com
RSpec doesn't modify the ruby interpreter in any way, so constructs that are possible in Ruby are possible in RSpec.  In ruby you have to use `elsif` (not `elseif`).

HTH,
Myron

--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/a7c9ef38-8271-4b6e-be27-a2306bd0727a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sasha S

unread,
Jan 29, 2016, 1:33:27 PM1/29/16
to rspec
Thank you!

Sasha S

unread,
Jan 29, 2016, 1:33:49 PM1/29/16
to rspec
Thank you!
Reply all
Reply to author
Forward
0 new messages