Sha256: 21d56a896fbf713ea04191e9a1f72b3ac32154227965ade1b1c85fdfe5cccb81
Contents?: true
Size: 496 Bytes
Versions: 3
Compression:
Stored size: 496 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
airborne-0.0.21 | spec/airborne/rack_sinatra_spec.rb |
airborne-0.0.20 | spec/airborne/rack_sinatra_spec.rb |
airborne-0.0.19 | spec/airborne/rack_sinatra_spec.rb |