Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Feature Request: Allow then to take a block

9 views
Skip to first unread message

Chris Lorenzo

unread,
Sep 15, 2014, 2:46:20 PM9/15/14
to webmoc...@googlegroups.com
Hi,

I'd like to be able to do:

stub_request(:any, %r|.*/rest/user.*|).to_return(:body => '{"errorCode": "SESSION_EXPIRED", "errorMessage": "session has expired"}',
                                                   :status => [401, 'Unauthorized'],
                                                   :headers => { 'error' => 'SESSION_EXPIRED'}).then do
  Some ruby code occurs after that request stub happens
end

Let me know if that would be possible.

Chris
Reply all
Reply to author
Forward
0 new messages