rubyx/stash/fragments/test_adds.rb
Torsten Ruger 67a6ef9f67 add rewriting of operator assignment
foo += 1 becomes foo = foo + 1 in vool
2018-06-25 16:32:20 +03:00

27 lines
428 B
Ruby

require_relative 'helper'
module Rubyx
class TestRubyAdds < MiniTest::Test
include RubyxTests
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
i += 1
end
return result
end
HERE
@stdout = "Hello there"
check
end
end
end