Re: [rspec-users] arbitrary handling of received messages in mocks

2009-08-26 Thread Chuck Remes
On Aug 25, 2009, at 5:13 PM, Tom Stuart wrote: On 25 Aug 2009, at 20:59, Chuck Remes wrote: The documentation says the expectation passes or fails based upon the return value of the block. I can't even force it to fail by returning false. The docs (http://rspec.info/documentation/mocks/me

Re: [rspec-users] arbitrary handling of received messages in mocks

2009-08-25 Thread Tom Stuart
On 25 Aug 2009, at 20:59, Chuck Remes wrote: The documentation says the expectation passes or fails based upon the return value of the block. I can't even force it to fail by returning false. The docs (http://rspec.info/documentation/mocks/message_expectations.html ) say: You can supply a

Re: [rspec-users] arbitrary handling of received messages in mocks

2009-08-25 Thread Ben Mabey
Chuck Remes wrote: I am trying to process a message sent to a mock to verify it contains the correct keys. In my case I am sending a JSON string to the mock built from data passed in via the test. The object internally builds a hash and then constructs the JSON string from it. I can't get my

[rspec-users] arbitrary handling of received messages in mocks

2009-08-25 Thread Chuck Remes
I am trying to process a message sent to a mock to verify it contains the correct keys. In my case I am sending a JSON string to the mock built from data passed in via the test. The object internally builds a hash and then constructs the JSON string from it. I can't get my mock to fail thou