From: Druhie Almighty Date: 2007-12-25T23:36:51+09:00 Subject: Creating tests Hi! I guess, my problem will scarcely take you very long :) Recently I faced with a trouble connected with creating the tests for my program. It usually occured to be sufficient to use the methods within the class I was testing and compare the rusult with the neccesary value of variable or method which is used for variable. But for the current program I need a test that would simulate the input. In other words, for an instance let us have the following 'program': ### a=0 puts("answer is #{a+=gets.to_f}") while true ### The test must input the numbers sequently and assert the equality of the actual output with the necessary string after each step of the cycle. So, could you please give me an example of how such tests are supposed to be written? I'd be very thankful for your help! -- Posted via http://www.ruby-forum.com/.