[rspec-users] State-based expectations (as per jMock in GOOS)

2009-12-18 Thread Ashley Moran
Hi all I'm working my way through Growing Object-Oriented Software[1], currently at the start of chapter 15. Chapter 14 introduces a concept I haven't seen before, state-based expectations based on sent messages. The principle appears to be object O has sent message M = O is in state S

Re: [rspec-users] State-based expectations (as per jMock in GOOS)

2009-12-18 Thread Tom Stuart
On 18 Dec 2009, at 14:35, Ashley Moran wrote: The principle appears to be object O has sent message M = O is in state S followed by O is in state S = (expectation E met) passes spec O is not in state S = (expectation E met) violates spec Can you elaborate? From a position of no

Re: [rspec-users] State-based expectations (as per jMock in GOOS)

2009-12-18 Thread Ashley Moran
On Dec 18, 2009, at 2:46 pm, Tom Stuart wrote: Can you elaborate? From a position of no knowledge, the most obvious question to me is: why would I care about the state of O? Either the change in O's state is observable through its behaviour (in which case I specify that behaviour) or it's