2018-08-19 15:36:51 +03:00
|
|
|
module Parfait
|
2019-09-12 22:27:10 +03:00
|
|
|
module MethodHelper
|
|
|
|
def make_method(name = :meth , clazz = :Object)
|
|
|
|
@obj = Parfait.object_space.get_type_by_class_name(clazz)
|
2019-09-18 22:07:05 +03:00
|
|
|
@args = Parfait::Type.for_hash( { bar: :Integer , foo: :Type} , @obj.object_class)
|
|
|
|
@frame = Parfait::Type.for_hash( { local_bar: :Integer , local_foo: :Type},@obj.object_class)
|
2019-09-12 22:27:10 +03:00
|
|
|
@method = Parfait::CallableMethod.new( name , @obj , @args , @frame)
|
|
|
|
end
|
|
|
|
end
|
2018-08-19 15:36:51 +03:00
|
|
|
class ParfaitTest < MiniTest::Test
|
2019-09-12 22:27:10 +03:00
|
|
|
include MethodHelper
|
2018-08-19 15:36:51 +03:00
|
|
|
|
|
|
|
def setup
|
2019-02-08 23:03:23 +02:00
|
|
|
Parfait.boot!(Parfait.default_test_options)
|
2018-08-19 15:36:51 +03:00
|
|
|
@space = Parfait.object_space
|
|
|
|
end
|
|
|
|
end
|
2019-02-09 12:44:35 +02:00
|
|
|
class BigParfaitTest < ParfaitTest
|
|
|
|
def setup
|
|
|
|
Parfait.boot!(Parfait.full_test_options)
|
|
|
|
@space = Parfait.object_space
|
|
|
|
end
|
|
|
|
end
|
2018-08-19 15:36:51 +03:00
|
|
|
end
|