spec/config/client.rb in quandl_format-0.4.3 vs spec/config/client.rb in quandl_format-0.5.0

- old
+ new

@@ -1,2 +1,16 @@ -Quandl::Client.token = ENV['QUANDL_AUTH_TOKEN'] -Quandl::Client.use ENV['QUANDL_TEST_URL'] +require 'ostruct' +require 'yaml' + +module Spec +module Config + Quandl = OpenStruct.new(YAML.load(File.read(File.join(ENV['HOME'], '.quandl/test')))) +end +end + +require "quandl/client" +require "quandl/fabricate" + +include Quandl::Client + +Quandl::Client.token = Spec::Config::Quandl.token +Quandl::Client.use( Spec::Config::Quandl.quandl_url ) \ No newline at end of file