Sha256: 19eec453871469a4d7ae8bedcfdcaa4b3669dbd5a00dd56301973c57d5b1add6

Contents?: true

Size: 816 Bytes

Versions: 11

Compression:

Stored size: 816 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)

      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

11 entries across 11 versions & 1 rubygems

Version Path
scout-gear-10.7.3 test/scout/offsite/test_step.rb
scout-gear-10.7.2 test/scout/offsite/test_step.rb
scout-gear-10.7.1 test/scout/offsite/test_step.rb
scout-gear-10.7.0 test/scout/offsite/test_step.rb
scout-gear-10.4.0 test/scout/offsite/test_step.rb
scout-gear-10.3.0 test/scout/offsite/test_step.rb
scout-gear-10.2.0 test/scout/offsite/test_step.rb
scout-gear-10.1.0 test/scout/offsite/test_step.rb
scout-gear-10.0.1 test/scout/offsite/test_step.rb
scout-gear-9.1.0 test/scout/offsite/test_step.rb
scout-gear-9.0.0 test/scout/offsite/test_step.rb