Sha256: 66b5ff4eb587b5cb1a577c195d4529e269dffd42575c974b28a4a80f5a1beee7

Contents?: true

Size: 788 Bytes

Versions: 9

Compression:

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

require 'scout/resource'
require 'scout/resource/scout'

class TestResourceSoftware < Test::Unit::TestCase
  module TestResource
    extend Resource

    self.subdir = Path.setup('tmp/test-resource')
  end

  def test_install
    Resource.install nil, "scout_install_example", tmpdir.software do
      <<-EOF
echo "#!/bin/bash\necho WORKING" > $OPT_BIN_DIR/scout_install_example
chmod +x $OPT_BIN_DIR/scout_install_example
      EOF
    end
    assert_nothing_raised do
      CMD.cmd(tmpdir.software.opt.bin.scout_install_example).read
    end
    assert_equal "WORKING", CMD.cmd('scout_install_example').read.strip
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
scout-essentials-1.6.3 test/scout/resource/test_software.rb
scout-essentials-1.6.2 test/scout/resource/test_software.rb
scout-essentials-1.6.1 test/scout/resource/test_software.rb
scout-essentials-1.6.0 test/scout/resource/test_software.rb
scout-essentials-1.3.1 test/scout/resource/test_software.rb
scout-essentials-1.3.0 test/scout/resource/test_software.rb
scout-essentials-1.2.0 test/scout/resource/test_software.rb
scout-essentials-1.1.1 test/scout/resource/test_software.rb
scout-essentials-1.1.0 test/scout/resource/test_software.rb