2013-01-29 22:52:10 -06:00
|
|
|
require 'testing_env'
|
2013-04-02 15:33:35 -05:00
|
|
|
require 'extend/set'
|
|
|
|
require 'requirements/x11_dependency'
|
2013-01-29 22:52:10 -06:00
|
|
|
|
|
|
|
class X11DependencyTests < Test::Unit::TestCase
|
|
|
|
def test_eql_instances_are_eql
|
|
|
|
x = X11Dependency.new
|
|
|
|
y = X11Dependency.new
|
|
|
|
assert x.eql?(y)
|
|
|
|
assert y.eql?(x)
|
|
|
|
assert x.hash == y.hash
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_not_eql_when_hashes_differ
|
|
|
|
x = X11Dependency.new("foo")
|
|
|
|
y = X11Dependency.new
|
|
|
|
assert x.hash != y.hash
|
|
|
|
assert !x.eql?(y)
|
|
|
|
assert !y.eql?(x)
|
|
|
|
end
|
|
|
|
|
2013-04-01 18:56:14 -05:00
|
|
|
def test_x_env
|
|
|
|
x = X11Dependency.new
|
|
|
|
x.stubs(:satisfied?).returns(true)
|
|
|
|
ENV.expects(:x11)
|
|
|
|
x.modify_build_environment
|
|
|
|
end
|
2013-01-29 22:52:10 -06:00
|
|
|
end
|