seancribbs/ripple — Issue #256: Ripple::TestServer clobbers custom add_paths from config
Author: outoftime
Created: 2011-12-14 15:56:16+00:00
State: open

Given the following config:

test:
env:
riak_kv:
add_paths:
- <%= Rails.root.join('app/mapreduce/erlang') %>

We get the following:

ruby-1.9.2-p290-patched :004 > Ripple::TestServer.instance.env[:riak_kv][:add_paths]
=> []

ruby-1.9.2-p290-patched :005 > Ripple.config[:env][:riak_kv][:add_paths]
=> ["/home/mat/Projects/brewster/app/mapreduce/erlang", "/home/mat/.rvm/gems/ruby-1.9.2-p290-patched/gems/riak-client-1.0.0.snapshot.60d08fe/erl_src"]

The only way I've found to get this to work is to add the following to my `spec_helper` before `Ripple::TestServer.setup`:

(Ripple::TestServer.instance.env[:riak_kv][:add_paths] ||= []) << Rails.root.join('app/mapreduce/erlang').to_s