Sha256: a0bb03fd668d4d8e6057a3df2a7549222b3e3dc69f4eeb15167093eb6fde5aaa
Contents?: true
Size: 577 Bytes
Versions: 2
Compression:
Stored size: 577 Bytes
Contents
require 'spec_helper' describe 'expect_json' do it 'should ensure correct json values' do mock_get('simple_get') get '/simple_get' expect_json(name: 'Alex', age: 32) end it 'should fail when incorrect json is tested' do mock_get('simple_get') get '/simple_get' expect { expect_json(bad: 'data') }.to raise_error(ExpectationNotMetError) end it 'should allow full object graph' do mock_get('simple_path_get') get '/simple_path_get' expect_json(name: 'Alex', address: { street: 'Area 51', city: 'Roswell', state: 'NM' }) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
airborne-0.2.1 | spec/airborne/expectations/expect_json_spec.rb |
airborne-0.2.0 | spec/airborne/expectations/expect_json_spec.rb |