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