Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

some cucumber helpers for testing ruote (ruby workflow engine) definitions and participants

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 features
Octocat-spinner-32 flows
Octocat-spinner-32 lib
Octocat-spinner-32 CHANGELOG.txt
Octocat-spinner-32 CREDITS.txt
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 TODO.txt
Octocat-spinner-32 ruote-cukes.gemspec
README.rdoc

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

Something went wrong with that request. Please try again.