Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Feature request: should_request expectation
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Evgeniy Dolzhenko  
View profile  
 More options Nov 22 2011, 8:37 am
From: Evgeniy Dolzhenko <dolze...@gmail.com>
Date: Tue, 22 Nov 2011 17:37:06 +0400
Local: Tues, Nov 22 2011 8:37 am
Subject: Re: Feature request: should_request expectation
Hey, that's handy, thanks!

On 11/22/2011 5:35 PM, Bartosz Blimke wrote:

> Webmock by design follows stub-execute-verify paradigm and it separates
> stubs
> from expectations. Each of them can be used independently.

> You can however set expectations on already created stub if you want to
> avoid duplication.

> stub = stub_request(:get, "www.example.com <http://www.example.com>")
> # ... make requests ...
> stub.should have_been_requested

> Bartosz

> 2011/11/22 Thibaut Barr re <thibaut.barr...@gmail.com
> <mailto:thibaut.barr...@gmail.com>>

>     Hello!

>     I have exactly the same question but could not yet figure this out
>     (I'm only getting started with WebMock): how to stub a request and
>     put an expectation at the same time? Is it currently possible using
>     a built-in function in WebMock, or should I just use two statements
>     or a quick helper of mine?

>     Thanks for any hint,

>     -- Thibaut


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.