2018-06-30 22:16:17 +02:00
|
|
|
require_relative "helper"
|
|
|
|
|
2019-08-12 11:36:32 +02:00
|
|
|
module Mom
|
2018-06-30 22:16:17 +02:00
|
|
|
class TestBuiltinFunction < MiniTest::Test
|
|
|
|
|
|
|
|
def setup
|
2019-02-08 22:03:23 +01:00
|
|
|
Parfait.boot!(Parfait.default_test_options)
|
2019-08-11 13:31:00 +02:00
|
|
|
@functions = Builtin.boot_functions
|
2018-06-30 22:16:17 +02:00
|
|
|
end
|
|
|
|
def test_has_boot_function
|
2019-08-11 13:31:00 +02:00
|
|
|
assert @functions
|
2018-06-30 22:16:17 +02:00
|
|
|
end
|
|
|
|
def test_boot_function_type
|
2019-08-11 13:31:00 +02:00
|
|
|
assert_equal Array, @functions.class
|
2018-06-30 22:16:17 +02:00
|
|
|
end
|
|
|
|
def test_boot_function_length
|
2019-08-12 10:31:47 +02:00
|
|
|
assert_equal 22, @functions.length
|
2018-06-30 22:16:17 +02:00
|
|
|
end
|
|
|
|
def test_boot_function_first
|
2019-08-11 13:31:00 +02:00
|
|
|
assert_equal Mom::MethodCompiler, @functions.first.class
|
2018-06-30 22:16:17 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|