2019-09-07 21:13:53 +02:00
|
|
|
require_relative "helper"
|
|
|
|
|
|
|
|
module Ruby
|
|
|
|
class TestSendRequireHelper < MiniTest::Test
|
|
|
|
include RubyTests
|
|
|
|
def setup
|
2019-10-03 23:36:49 +02:00
|
|
|
@lst = compile( "require_relative 'helper'").to_sol
|
2019-09-07 21:13:53 +02:00
|
|
|
end
|
|
|
|
def test_helper_class
|
2019-10-03 23:36:49 +02:00
|
|
|
assert_equal Sol::ClassExpression , @lst.class
|
2019-09-07 21:13:53 +02:00
|
|
|
assert_equal :ParfaitTest , @lst.name
|
|
|
|
end
|
|
|
|
def test_methods
|
2019-10-03 23:36:49 +02:00
|
|
|
assert_equal Sol::Statements , @lst.body.class
|
|
|
|
assert_equal Sol::MethodExpression , @lst.body.first.class
|
2019-09-07 21:13:53 +02:00
|
|
|
assert_equal :setup , @lst.body.first.name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
class TestSendRequireparfait < MiniTest::Test
|
|
|
|
include RubyTests
|
|
|
|
def setup
|
2019-10-03 23:36:49 +02:00
|
|
|
@lst = compile( "require_relative 'object'").to_sol
|
2019-09-07 21:13:53 +02:00
|
|
|
end
|
|
|
|
def test_helper_class
|
2019-10-03 23:36:49 +02:00
|
|
|
assert_equal Sol::ClassExpression , @lst.class
|
2019-09-07 21:13:53 +02:00
|
|
|
assert_equal :Object , @lst.name
|
|
|
|
end
|
|
|
|
def test_methods
|
2019-10-03 23:36:49 +02:00
|
|
|
assert_equal Sol::Statements , @lst.body.class
|
|
|
|
assert_equal Sol::MethodExpression , @lst.body.first.class
|
2019-09-07 21:13:53 +02:00
|
|
|
assert_equal :type , @lst.body.first.name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|