Sha256: a88d8973697c1d703d18b69efe5d1cd133fd54f9d80014a4fa4a30cfc5465ce4
Contents?: true
Size: 874 Bytes
Versions: 2
Compression:
Stored size: 874 Bytes
Contents
if respond_to?(:require_relative, true) require_relative 'common' else require File.dirname(__FILE__) + '/common' end require 'rest-graph/load_config' describe RestGraph::LoadConfig do after do RR.verify end should 'honor rails config' do ::Rails = Object.new mock(Rails).env { 'test' } mock(Rails).root{ File.dirname(__FILE__) } 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' } TestHelper.ensure_rollback{ RestGraph::LoadConfig.load_if_rails! check } TestHelper.ensure_rollback{ RestGraph::LoadConfig.load_config!( "#{File.dirname(__FILE__)}/config/rest-graph.yaml", 'test') check } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rest-graph-1.7.0 | test/test_load_config.rb |
rest-graph-1.6.0 | test/test_load_config.rb |