On Mon, Mar 5, 2012 at 4:22 AM, Vaughan
<vrou...@gmail.com> wrote:
I could not get this to work in Rails 3.1.3.
Evergreen.application.config.assets.paths is not getting updated.
Is your suggestion specific to Rails 3.2?
Actually not, we eventually abandoned that way of doing it. Turns out evergreen.rb is evaluated every time a spec is run.
He
re's what we ended up doing.
config/environments/test.rb and config/environments/development.rb:
config.assets.paths << Rails.root.join('spec', 'javascripts').to_s
config/evergreen.rb:
Evergreen.configure do |config|
if ENV['guard'].present?
require 'capybara-webkit'
config.driver = :webkit
end
In case anyone wonders, ENV['GUARD'] is set from our Guardfile. It's not out-of-the-box.
We need to add the asset path to the development environment as well since Evergreen runs on that environment (which caused us some trouble we needed to work around).
Magnus