Sha256: 88dec3ff2a0e31e2b386fa7acf490c84d92f41e33e09d268667fa8a9841d4f95
Contents?: true
Size: 844 Bytes
Versions: 2
Compression:
Stored size: 844 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 it 'would 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.1.1 | test/test_load_config.rb |
rest-graph-1.1.0 | test/test_load_config.rb |