Skip to content

Commit

Permalink
Merge pull request #2 from mcampbell/typo
Browse files Browse the repository at this point in the history
typo fix, unnecessary whitespace removal
  • Loading branch information
ixti committed Apr 22, 2024
2 parents c483be5 + d2baf01 commit 9ba0131
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
## About

HTTP (The Gem! a.k.a. http.rb) is an easy-to-use client library for making requests
from Ruby. RSpec is a Behaviour Driven Development spec libary for Ruby. Making TDD
from Ruby. RSpec is a Behaviour Driven Development spec libary for Ruby. Making TDD
Productive and Fun.

This gem adds custom matchers to make it easier to check http requests.

## Installation

Add the gem to your gemfile with bundler
```bash
$ bunlde add http-rspec --require
Add the gem to your gemfile with bundler
```bash
$ bundle add http-rspec --require
```
or manually
or manually
```
gem "http-rspec", require: false
````
Expand All @@ -45,7 +45,7 @@ end
# in the individual describe blocks
RSpec.describe Service do
include HTTP::Support::RspecMatchers

it "makes request" do
expect(response).to be_an_http_gem_response.with(status: 200)
end
Expand All @@ -64,18 +64,18 @@ The following API documentation is also available:
Here's some simple examples to get you started:

```ruby
it "has successful response" do
it "has successful response" do
response = HTTP.get("www.nrk.no")
expect(response).to be_an_http_gem_response.with(status: :success) # will match 2xx status code
expect(response).to be_an_http_gem_response.with(status: :redirect) # will match 3xx status code
expect(response).to be_an_http_gem_response.with(status: :error) # will match 3xx status code

expect(response).to be_an_http_gem_response.with(status: :ok) # require 200 status code
expect(response).to be_an_http_gem_response.with(status: 200) # require 200 status code
expect(response).to be_an_http_gem_response.with(status: :not_found) # require 404 status code
expect(response).to be_an_http_gem_response.with(status: 404) # require 404 status code
# you can access HTTP::Support::RspecMatchers::STATUS_CODE_TO_SYMBOL to see the full

# you can access HTTP::Support::RspecMatchers::STATUS_CODE_TO_SYMBOL to see the full
# mapping between code and symbol
end
```
Expand Down

0 comments on commit 9ba0131

Please sign in to comment.