require_relative "virtual_helper" class TestMethods < MiniTest::Test include VirtualHelper def test_simplest_function @string_input = < 5) return 10 else return 20 end end HERE @output = [Virtual::MethodDefinition.new(:foo,[Ast::NameExpression.new(:x)])] check end def ttest_function_return_while @string_input = < 5) do n = n + 1 return n end end HERE @output = [Virtual::MethodDefinition.new(:foo,[Ast::NameExpression.new(:x)])] check end def ttest_function_big_while @string_input = < 1 ) do tmp = a a = b b = tmp + b puts(b) n = n - 1 end end HERE @output = [Virtual::MethodDefinition.new(:foo,[Ast::NameExpression.new(:x)])] check end end