Sha256: 3d6266fca9afca36801b74600917c2479b5f784a0f67d7bf7cfd4ef431724203
Contents?: true
Size: 750 Bytes
Versions: 1
Compression:
Stored size: 750 Bytes
Contents
require File.expand_path('../teststrap', __FILE__) require File.expand_path('../../lib/rabl', __FILE__) context 'Rabl::Configuration' do context 'defaults' do # multi_json compatibility TODO helper(:json_engine) { MultiJson.respond_to?(:adapter) ? MultiJson.adapter : MultiJson.engine } setup { Rabl.configuration } asserts(:include_json_root).equals true asserts(:include_xml_root).equals false asserts(:enable_json_callbacks).equals false asserts(:json_engine).equals { json_engine } end context 'custom JSON engine' do setup do Rabl.configure do |c| c.json_engine = :yajl end end asserts('uses a custom JSON engine') { topic.json_engine.to_s =~ /MultiJson.*::Yajl/ } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rabl-0.6.10 | test/configuration_test.rb |