endo
This is a tool for testing api endpoints. In development state.
Usage
Write endo file. ex. endo/sample.endo
set :base_url, 'http://endo-sample.maruware.com'
get '/articles' do
expect(body: ->{ at(0)[:title] }).to eq 'good'
end
get '/articles/:article_id' do
param :article_id do
from :get, '/articles', ->{ first[:id] }
end
expect(header: 'Content-Type').to eq 'application/json; charset=utf-8'
end
post '/articless' do
param :title, 'hello'
param :text, 'Hello, world!'
end
Exec endo command.
Installation
Add this line to your application's Gemfile:
gem 'endo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install endo