Sha256: 82a6eafe01c9de853aacefd48c11441c9d2f20a706e592db0ff3117f548d4065
Contents?: true
Size: 955 Bytes
Versions: 8
Compression:
Stored size: 955 Bytes
Contents
if respond_to?(:require_relative, true) require_relative 'common' else require File.dirname(__FILE__) + '/common' end require 'rest-graph/config_util' describe RestGraph::ConfigUtil do after do RR.verify end should 'honor rails config' do ::Rails = Object.new mock(Rails).env { 'test' }.times(2) mock(Rails).root{ File.dirname(__FILE__) }.times(2) check = lambda{ RestGraph.default_app_id.should == 41829 RestGraph.default_secret.should == 'r41829'.reverse RestGraph.default_auto_decode.should == false RestGraph.default_lang.should == 'zh-tw' } [RestGraph::ConfigUtil, RestGraph].each{ |const| TestHelper.ensure_rollback{ const.load_config_for_rails check.call } TestHelper.ensure_rollback{ const.load_config( "#{File.dirname(__FILE__)}/config/rest-graph.yaml", 'test') check.call } } end end
Version data entries
8 entries across 8 versions & 2 rubygems