Skip to content

Commit

Permalink
Use do...end block and add spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
yous committed Feb 3, 2015
1 parent c938b6b commit 0806a94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ RestClient.post('www.example.com', 'abc') # ===> Success
```ruby
stub_request(:get, "user:pass@www.example.com")

Net::HTTP.start('www.example.com') {|http|
Net::HTTP.start('www.example.com') do |http|
req = Net::HTTP::Get.new('/')
req.basic_auth 'user', 'pass'
http.request(req)
} # ===> Success
end # ===> Success
```

### Matching uris using regular expressions
Expand Down Expand Up @@ -282,7 +282,7 @@ stub_request(:any, "www.example.com").
to_return(:status => [500, "Internal Server Error"])

req = Net::HTTP::Get.new("/")
Net::HTTP.start("www.example.com") {|http| http.request(req)}.
Net::HTTP.start("www.example.com") { |http| http.request(req) }.
message # ===> "Internal Server Error"
```

Expand Down

0 comments on commit 0806a94

Please sign in to comment.