Thanks a lot Jon. I've refactored the loop and the tests began to work. 
But there is one more problem. The test does not reach the *expect* 
operator. This is visible if you replace the method with one that will not 
be called, e.g. "*load*"
     
     
      it 'create account if input is create' do
        allow(current_subject).to receive_message_chain(:gets, :chomp).
and_return(*input_sequence)  
        # current_subject.console
        expect(current_subject).to receive(:load)
        current_subject.console
      end


The test does not reach the “expect” operator, nether if 
*current_subject.console* is after nor before the one.
The loop is not infinite. The exit from the loop occurs. I checked this by 
the displayed messages and the status value.

The full code is on https://github.com/dmitriy-sokolyanskiy/ref/tree/dev

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/0e19af2e-1b99-491f-9c8c-b5b554e6ff64%40googlegroups.com.

Reply via email to