Sha256: 74d32d51259754bbbcc3f62d0a4baaebe1b9bfa9daeaed11c89f93309431adc9

Contents?: true

Size: 828 Bytes

Versions: 1

Compression:

Stored size: 828 Bytes

Contents

require File.expand_path(__FILE__).sub(%r(/test/.*), '/test/test_helper.rb')
require File.expand_path(__FILE__).sub(%r(.*/test/), '').sub(/test_(.*)\.rb/,'\1')

class TestOffsiteStep < Test::Unit::TestCase
  def test_offsite_task
    workflow_code =<<-EOF
module TestWF
  extend Workflow

  input :string, :string, "String", "string"
  task :string => :string do |string| string end
end

TestWF.directory = Path.setup("#{tmpdir.offsite.TestWF}")
    EOF

    TmpFile.with_file workflow_code, :extension => 'rb' do |wffile|
      wf = Workflow.require_workflow wffile

      job = wf.job(:string)

      sss 0
      off = OffsiteStep.setup job, server: 'localhost', workflow_name: wffile

      refute off.done?
      assert_equal 'string', off.run

      assert off.done?
      assert_equal 'string', off.run
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scout-gear-8.1.0 test/scout/offsite/test_step.rb