diff --git a/test/parfait/test_typed_method.rb b/test/parfait/test_typed_method.rb index 818ba35c..90da3e9d 100644 --- a/test/parfait/test_typed_method.rb +++ b/test/parfait/test_typed_method.rb @@ -5,9 +5,8 @@ class TestMethod < MiniTest::Test def setup obj = Parfait.object_space.get_class_by_name(:Object).instance_type args = Parfait::Type.for_hash( obj.object_class , { bar: :Integer , foo: :Type}) - @method = ::Parfait::TypedMethod.new obj , :meth , args - @method.add_local :local_bar , :Integer - @method.add_local :local_foo , :Type + frame = Parfait::Type.for_hash( obj.object_class , { local_bar: :Integer , local_foo: :Type}) + @method = Parfait::TypedMethod.new( obj , :meth , args , frame) end def test_method_name diff --git a/test/parfait/type/test_method_api.rb b/test/parfait/type/test_method_api.rb index 2d9446a4..aa79684d 100644 --- a/test/parfait/type/test_method_api.rb +++ b/test/parfait/type/test_method_api.rb @@ -9,9 +9,12 @@ class TestMethodApi < MiniTest::Test @try_type = @try_class.instance_type end + def empty_frame + Parfait::Type.for_hash( @try_class , { }) + end def foo_method( for_class = :Try) args = Parfait::Type.for_hash( @try_class , { bar: :Integer}) - ::Parfait::TypedMethod.new @space.get_class_by_name(for_class).instance_type , :foo , args + ::Parfait::TypedMethod.new( @space.get_class_by_name(for_class).instance_type , :foo , args,empty_frame) end def add_foo_to( clazz = :Try ) foo = foo_method( clazz ) @@ -42,7 +45,7 @@ class TestMethodApi < MiniTest::Test end def test_create_method args = Parfait::Type.for_hash( @try_class , { bar: :Integer}) - @try_type.create_method :bar, args + @try_type.create_method :bar, args , empty_frame assert @try_type.method_names.inspect.include?("bar") end def test_method_get