Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Oct 17, 2011
1 parent a86197f commit dfaf348
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Expand Up @@ -62,17 +62,19 @@ A web app is great for a dedicated integration server. Moxy will run on any rack

Below are some examples of `mock_text` (in each, second line describes result).

stub_request :get, "http://google.com"
(Returns an empty content with 200 HTTP status code)
stub_request :get, "http://google.com"
(Returns an empty content with 200 HTTP status code)


stub_request(:get, "http://google.com").to_return(:body => "boo hoo!")
(Returns boo hoo! as content)
stub_request(:get, "http://google.com").to_return(:body => "boo hoo!")
(Returns boo hoo! as content)


stub_request(:get, "http://google.com").to_return(:body => "boo hoo!", :code => 500)
(Returns boo hoo! as content)
stub_request(:get, "http://google.com").to_return(:body => "boo hoo!", :code => 500)
(Returns boo hoo! as content)

Since currently `moxy` uses [WebMock](https://github.com/bblimke/webmock) under the hood (that may change), this will be WebMock's syntax, and you can go learn about it
for more examples.

## Contributing

Expand Down

0 comments on commit dfaf348

Please sign in to comment.