spec/praxis/response_definition_spec.rb in praxis-2.0.pre.5 vs spec/praxis/response_definition_spec.rb in praxis-2.0.pre.6

- old
+ new

@@ -521,16 +521,13 @@ end its([:name]) { should eq 'Instance' } context 'examples' do subject(:examples) { payload[:examples] } its(['json', :content_type]) { should eq('application/vnd.acme.instance+json') } - its(['xml', :content_type]) { should eq('application/vnd.acme.instance+xml') } it 'properly encodes the example bodies' do - json = Praxis::Application.instance.handlers['json'].parse(examples['json'][:body]) - xml = Praxis::Application.instance.handlers['xml'].parse(examples['xml'][:body]) - expect(json).to eq xml + expect(JSON.parse(examples['json'][:body])).to be_kind_of(Hash) end end context 'which does not have a identifier' do @@ -539,10 +536,9 @@ allow(response.media_type).to receive(:identifier).and_return(nil) end it 'still renders examples but as pure handler types for contents' do expect(subject['json'][:content_type]).to eq('application/json') - expect(subject['xml'][:content_type]).to eq('application/xml') end end end