Module: RuoteSpecHelpers

Defined in:
lib/spec/ruote_helpers.rb

Instance Method Summary collapse

Instance Method Details

#purge_engineObject



3
4
5
6
7
# File 'lib/spec/ruote_helpers.rb', line 3

def purge_engine
  @engine.application_context.values.each do |s|
    s.purge if s.respond_to?(:purge)
  end
end

#run_definition(pdef) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/spec/ruote_helpers.rb', line 9

def run_definition( pdef )
  fei = @engine.launch( pdef )
  wait( fei )

  @engine.should_not have_errors
  @engine.should_not have_remaining_expressions

  purge_engine
end

#wait(fei) ⇒ Object



19
20
21
22
23
# File 'lib/spec/ruote_helpers.rb', line 19

def wait( fei )
  Thread.pass
  return if @terminated_processes.include?( fei.wfid )
  @engine.wait_for( fei )
end