AirborneAPI 测试框架
Airborne 是一个 RSpec 驱动的 API 测试框架,灵感来自于 frisby.js
示例代码:
require 'airborne' describe 'sample spec' do it 'should validate types' do get 'http://example.com/api/v1/simple_get' #json api that returns { "name" : "John Doe" } expect_json_types({name: :string}) end it 'should validate values' do get 'http://example.com/api/v1/simple_get' #json api that returns { "name" : "John Doe" } expect_json({:name => "John Doe"}) end end
评论