Open infinite opened 10 years ago
From Anonymous on 2010-07-08 06:42:04+00:00
This is causing headaches for me. A fix would be appreciated.
From Anonymous on 2011-02-23 13:31:40+00:00
It wouuld be nice if it would behave as Mockito for java does:
when(mock.someMethod("some arg")) .thenReturn(1) .thenReturn(2) .thenReturn(3);
From Anonymous on 2011-04-29 20:56:49+00:00
Please fix that!
Now it is:
var mockedInstance = mock(SomeClass);
given(mockedInstance.method()).willReturn(0); trace(mockedInstance.method()); [trace] 0
given(mockedInstance.method()).willReturn(1); trace(mockedInstance.method()); [trace] 0
given(mockedInstance.method()).willReturn(2); trace(mockedInstance.method()); [trace] 0
Should be:
var mockedInstance = mock(SomeClass);
given(mockedInstance.method()).willReturn(0); trace(mockedInstance.method()); [trace] 0
given(mockedInstance.method()).willReturn(1); trace(mockedInstance.method()); [trace] 1
given(mockedInstance.method()).willReturn(2); trace(mockedInstance.method()); [trace] 2