Torsten Rüger
1a096110a8
opted to hack require to be getting on need require for the test helper and the files in lib/parfait General require mechanism would still be ok, but require_ralative means implementing file source, which needs to be dragged around. I'll make an issue
35 lines
1010 B
Ruby
35 lines
1010 B
Ruby
require_relative "helper"
|
|
|
|
module Ruby
|
|
class TestSendRequireHelper < MiniTest::Test
|
|
include RubyTests
|
|
def setup
|
|
@lst = compile( "require_relative 'helper'").to_vool
|
|
end
|
|
def test_helper_class
|
|
assert_equal Vool::ClassExpression , @lst.class
|
|
assert_equal :ParfaitTest , @lst.name
|
|
end
|
|
def test_methods
|
|
assert_equal Vool::Statements , @lst.body.class
|
|
assert_equal Vool::MethodExpression , @lst.body.first.class
|
|
assert_equal :setup , @lst.body.first.name
|
|
end
|
|
end
|
|
class TestSendRequireparfait < MiniTest::Test
|
|
include RubyTests
|
|
def setup
|
|
@lst = compile( "require_relative 'object'").to_vool
|
|
end
|
|
def test_helper_class
|
|
assert_equal Vool::ClassExpression , @lst.class
|
|
assert_equal :Object , @lst.name
|
|
end
|
|
def test_methods
|
|
assert_equal Vool::Statements , @lst.body.class
|
|
assert_equal Vool::MethodExpression , @lst.body.first.class
|
|
assert_equal :type , @lst.body.first.name
|
|
end
|
|
end
|
|
end
|