Skip to content

Commit a939f26

Browse files
committed
Add readme for relishapp
1 parent 6a821f0 commit a939f26

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

features/readme.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[![Travis status](http://travis-ci.org/zipmark/rspec_api_documentation.png)](http://travis-ci.org/zipmark/rspec_api_documentation.png)
2+
3+
[![Gemnasium status](https://gemnasium.com/zipmark/rspec_api_documentation.png)](https://gemnasium.com/zipmark/rspec_api_documentation.png)
4+
5+
http://github.com/zipmark/rspec_api_documentation
6+
7+
# RSpec API Doc Generator
8+
9+
Generate pretty API docs for your Rails APIs.
10+
11+
## Installation
12+
13+
Add rspec_api_documentation to your Gemfile
14+
15+
gem 'rspec_api_documentation'
16+
17+
Bundle it!
18+
19+
$> bundle install
20+
21+
Require it in your API tests
22+
23+
require "rspec_api_documentation"
24+
require "rspec_api_documentation/dsl"
25+
26+
See the wiki for additional setup. [Setting up RSpec API Documentation](https://github.com/zipmark/rspec_api_documentation/wiki/Setting-up-RspecApiDocumentation)
27+
28+
## Usage
29+
30+
resource "Account" do
31+
get "/accounts" do
32+
example "Get a list of all accounts" do
33+
do_request
34+
last_response.status.should be_ok
35+
end
36+
end
37+
38+
get "/accounts/:id" do
39+
parameter :id, "Account ID"
40+
41+
let(:account) { Factory(:account) }
42+
let(:id) { account.id }
43+
44+
example "Get an account", :document => :public do
45+
do_request
46+
last_response.status.should be_ok
47+
end
48+
end
49+
end
50+

0 commit comments

Comments
 (0)