J
Jesper Rønn-Jensen
I have a test file in my project to test dependencies to ruby gems,
arranged like this:
class DependenciesTest < Test::Unit::TestCase
def test_hpricot_should_exist
actual = require 'hpricot'
assert_equal(true, actual)
end
.... (more similar tests)
end # end class DependenciesTest
The documentation states that require should return true/false, but
it does not --- at least not for me in this test
Result:
==================
2) Failure:
test_hpricot_should_exist(DependenciesTest) [test/unit/
dependencies_test.rb:19]:
<true> expected but was
<[]>.
My questions:
* Why doesn't require return true?
* How should i form my dependencies test to make it work properly?
Thanks for any help and tips you can help me with!
/Jesper
arranged like this:
class DependenciesTest < Test::Unit::TestCase
def test_hpricot_should_exist
actual = require 'hpricot'
assert_equal(true, actual)
end
.... (more similar tests)
end # end class DependenciesTest
The documentation states that require should return true/false, but
it does not --- at least not for me in this test
Result:
==================
2) Failure:
test_hpricot_should_exist(DependenciesTest) [test/unit/
dependencies_test.rb:19]:
<true> expected but was
<[]>.
My questions:
* Why doesn't require return true?
* How should i form my dependencies test to make it work properly?
Thanks for any help and tips you can help me with!
/Jesper