Sha256: 3c212b6bf376646c94d568b1a84dbaa3888f54d49802051428338c7a0eccdd3e
Contents?: true
Size: 1.21 KB
Versions: 4
Compression:
Stored size: 1.21 KB
Contents
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) require 'yaml' require 'ostruct' # require and configure quandl_client with test config require_relative 'config/quandl' ENV['QUANDL_TOKEN'] = Spec::Config::Quandl.token ENV['QUANDL_URL'] = Spec::Config::Quandl.quandl_url require "rspec" require 'factory_girl' require 'pry' require 'commander' require 'quandl/command' require 'open3' # configure Quandl::Logger to use Config::Output require_relative 'config/output' factory_dir = File.join( File.dirname(__FILE__), 'factories/**/*.rb' ) Dir.glob( factory_dir ).each{|f| require(f); puts f } RSpec.configure do |config| config.include FactoryGirl::Syntax::Methods end def quandl(statement) version = "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" path = File.join(Quandl::Command::Tasks.root, 'bin/quandl') command = "bundle exec #{path} #{statement} --token #{Spec::Config::Quandl.token} --url #{Spec::Config::Quandl.quandl_url} --threads 1 --force-yes --trace --sandbox" stdin, stdout, stderr = Open3.popen3(command) OpenStruct.new( stderr: stderr.read, stdout: stdout.read ) end def data_path(path) File.join("spec/fixtures/data/", path) end def error_path(path) File.join("spec/fixtures/data/errors/", path) end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
quandl-0.4.4 | spec/spec_helper.rb |
quandl-0.4.3 | spec/spec_helper.rb |
quandl-0.4.2 | spec/spec_helper.rb |
quandl-0.4.1 | spec/spec_helper.rb |