blob: b4bde3f55277571df51981ef7146e87823cfa640 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#! /usr/bin/env ruby
# $Id: $
if __FILE__ == $0
$:.unshift '../lib'
$facterbase = ".."
end
require 'facter'
require 'test/unit'
# add the bin directory to our search path
ENV["PATH"] += ":" + File.join($facterbase, "bin")
# and then the library directories
libdirs = $:.find_all { |dir|
dir =~ /facter/ or dir =~ /\.\./
}
ENV["RUBYLIB"] = libdirs.join(":")
class TestFacterBin < Test::Unit::TestCase
def setup
end
def teardown
end
def test_version
output = nil
assert_nothing_raised {
output = %x{facter --version 2>&1}.chomp
}
print output
assert ( output == Facter.version )
end
end
|