Hi,
I am new to ruby and rspec. I would like to use ruby/rspec/cucumber to
automate acceptance tests for a number of integrated systems at my
work. I get the basics of cucumber features, but how do I chain these
tests so that I can test a process from start to finish. Essentially,
I want to use the features as components that I can plug together to
create the different tests. Can cucumber/rspec be used this way.

Hi,
I am new to ruby and rspec. I would like to use ruby/rspec/cucumber to
automate acceptance tests for a number of integrated systems at my
work. I get the basics of cucumber features, but how do I chain these
tests so that I can test a process from start to finish. Essentially,
I want to use the features as components that I can plug together to
create the different tests. Can cucumber/rspec be used this way.

Can you give an example. Something simple, but just complex enough to
get your goal across. I have an idea of what you’re after, but don’t
want to waste my time writing or anybody else’s time reading if I’m
wrong

So I have a number of Java based web systems. The systems allow users
to lodge applications for various products/services that my
organisation provides. The applications usually have at least 4 or 5
pages, but may be longer depending on the info that is entered. There
is alot of common page fragments between the two systems (eg most
systems have a page with bio info: names, Birth dates, gender etc) but
each system with have different fields in addition the common fields
on each page fragment. So, what I wanted to do is create features for
logon, features to deal with the common page fragments, like the bio
stuff, features to deal with the unique parts, and chain these all
together so that I can build up a test to test the end to end
application process. I will be using either watir or selenium with
rspec/cucumber. The organization currently uses commercial test
automation tools, so I am looking at ditching these and going with a
Ruby based solution.

The cucumber examples I have seen usually are short:
Given…something
Wen … I do something
Then … I expect this to happen

logon, features to deal with the common page fragments, like the bio
Then … I expect this to happen
And…
Then…
Given…
And…
And…
Then…

This is possible, but not really advisable in such raw form - you’ll
end up with tests that, while they might make sense at the time you
write them, are quite hard to read and therefore maintain. I’d always
try to stick to a single Given / When / Then loop for a single scenario.