2015-12-01 10:55:33 +01:00
|
|
|
require_relative 'helper'
|
|
|
|
|
2017-01-17 23:05:36 +01:00
|
|
|
module Rubyx
|
2017-01-11 18:18:04 +01:00
|
|
|
class TestRubyAdds < MiniTest::Test
|
2017-01-17 23:05:36 +01:00
|
|
|
include RubyxTests
|
2015-12-01 10:55:33 +01:00
|
|
|
|
2017-01-11 18:18:04 +01:00
|
|
|
def pest_ruby_adds
|
|
|
|
@string_input = <<HERE
|
|
|
|
def fibo( n)
|
|
|
|
a = 0
|
|
|
|
b = 1
|
|
|
|
i = 1
|
|
|
|
while( i < n ) do
|
|
|
|
result = a + b
|
|
|
|
a = b
|
|
|
|
b = result
|
2018-06-25 15:32:20 +02:00
|
|
|
i += 1
|
2017-01-11 18:18:04 +01:00
|
|
|
end
|
|
|
|
return result
|
2015-12-01 10:55:33 +01:00
|
|
|
end
|
|
|
|
HERE
|
2017-01-11 18:18:04 +01:00
|
|
|
@stdout = "Hello there"
|
|
|
|
check
|
2015-12-01 10:55:33 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|