laserlemon/figaro — pull request #125 by justalisteningman (2014-04-23 19:24:49+00:00)
Title: Spring watches application.yml

Test covers that 'Spring.watch config/application.yml' is appended to config/spring.rb - which according to the spring gem documentation, is what is required to have Spring watch a file.

I struggled with writing a test that would test whether Spring actually loads that file into it's watched file list. Loading up Spring within the context of the Aruba sub-rails application in a test proved difficult.

http://media0.giphy.com/media/yAOjunY81Trjy/giphy.gif

It could be argued that such a test isn't necessary - Spring is now a part of Rails, and should be expected to perform as described - a test should cover that we interface with their system correctly, not test their system.

Regardless, if such a test is implemented, it should test whether Spring.watcher.files includes config/application.yml

I spun up a new rails app, and pointed the figaro gem to my fork - Spring successfully watched config/application.yml upon figaro installation without any further user input. Pictures of such are below.

![image](https://cloud.githubusercontent.com/assets/3952646/2781991/446d06c8-cb1a-11e3-81eb-664833c1b414.png)

![image](https://cloud.githubusercontent.com/assets/3952646/2782016/bcf8a214-cb1a-11e3-9077-63ea9641ef06.png)