Sha256: e5daeee21d737f606a6176de7ac6ed415518501e98f636dc3ecf877f9c9b75f4
Contents?: true
Size: 516 Bytes
Versions: 17
Compression:
Stored size: 516 Bytes
Contents
require 'json' require 'sinatra' class SampleApp < Sinatra::Application before do content_type 'application/json' end get '/' do {foo: "bar"}.to_json end end Airborne.configure do |config| config.rack_app = SampleApp end describe 'rack app' do it 'should allow requests against a sinatra app' do get '/' expect_json_types({foo: :string}) end it 'should ensure correct values from sinatra app' do get '/' expect{expect_json_types({foo: :int})}.to raise_error end end
Version data entries
17 entries across 17 versions & 1 rubygems