ruote-cukes¶ ↑
Cucumber helpers (steps) for testing ruote process definitions and participants.
Scenario: alpha to bravo Given I have a ruote engine And the catchall participant is registered When I launch the flow """ Ruote.process_definition do sequence do alpha participant :ref => '${f:next}' end end """ Then the process should reach alpha When I get the first workitem of participant alpha And I update the workitem with | next | charly | And I reply with the workitem Then the process should reach charly
Note the usage of two columns cucumber tables for storing fields (or variables). The first column hold the keys, while the second one the values.
Look at features/ for the whole range of examples.
using them¶ ↑
gem install ruote-cukes
then make sure to include
require 'ruote-cukes'
in your feature support or step definitions.
complex fields¶ ↑
When using cucumber tables to represent fields (or variables), ruote-cukes will always try to decode the values via JSON. This thus becomes possible :
Scenario: alpha to bravo Given I have a ruote engine And the catchall participant is registered And the initial fields are | targets | ["alice","bob"] | When I launch the flow """ Ruote.process_definition do concurrent_iterator :on_field => 'targets', :to_f => 'f' do participant :ref => '${f:f}' end end """ Then the process should reach alice And the process should reach bob
running the example features¶ ↑
Make sure the ruote and cucumber gems are installed and run
cucumber
author¶ ↑
John Mettraux jmettraux.wordpress.com
license¶ ↑
MIT