2018-07-19 13:46:51 +02:00
|
|
|
require_relative "../helper"
|
|
|
|
|
|
|
|
module Ruby
|
|
|
|
module RubyTests
|
|
|
|
def setup
|
2019-02-08 22:03:23 +01:00
|
|
|
Parfait.boot!(Parfait.default_test_options)
|
2018-07-19 13:46:51 +02:00
|
|
|
end
|
|
|
|
def compile(input)
|
|
|
|
RubyCompiler.compile(input)
|
|
|
|
end
|
|
|
|
|
|
|
|
def ruby_to_vool(input)
|
2019-02-08 22:03:23 +01:00
|
|
|
FIXMERubyXCompiler.new(input).ruby_to_vool
|
2018-07-19 13:46:51 +02:00
|
|
|
end
|
|
|
|
|
2019-03-05 19:36:40 +01:00
|
|
|
def assert_raises_muted &block
|
|
|
|
orig_stdout = $stdout
|
|
|
|
$stdout = StringIO.new
|
|
|
|
assert_raises &block
|
|
|
|
$stdout = orig_stdout
|
|
|
|
end
|
2018-07-19 13:46:51 +02:00
|
|
|
end
|
|
|
|
end
|