chrismccord/sync — pull request #109 by wursttheke (2014-03-18 10:54:32+00:00)
Title: Absolute partial paths

Hey Chris!

I recently ran into an issue where sync wasn't doing its magic from a background worker. At first I thought it was the enable_sync call having a bug, but it turns out it was due to wrong partial paths. So it was trying to publish the changes, but the partials could not be found.

To solve this, I updated the partial paths with a call to Rails.root.

Don't be shocked by the large commit. I added a dummy rails app to the tests, so that an actual Rails.root is available and realistic partial paths can be tested. I removed some of your `Dir.stubs(:[])` calls in the partial tests and added some assertions for the empty scenarios.

The dummy app might be useful for future integration testing as well.

Philipp