Sha256: ab917bf9ccb8460b708661da70d95d2261e18c01e0869b6a63c5b7de21264201

Contents?: true

Size: 731 Bytes

Versions: 7

Compression:

Stored size: 731 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 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

7 entries across 7 versions & 2 rubygems

Version Path
scout-essentials-1.0.0 test/scout/resource/test_software.rb
scout-gear-9.1.0 test/scout/resource/test_software.rb
scout-gear-9.0.0 test/scout/resource/test_software.rb
scout-gear-8.1.0 test/scout/resource/test_software.rb
scout-gear-8.0.0 test/scout/resource/test_software.rb
scout-gear-7.3.0 test/scout/resource/test_software.rb
scout-gear-7.2.0 test/scout/resource/test_software.rb