spree/spree — pull request #3252 by wuboy0307 (2013-06-23 19:15:01+00:00)
Title: add the ability to override or decorate a sample file.

When doing "rake spree_sample:load", It will only load products in EUR and USD currency. However, if you are using different currency (for me, it's TWD). Sample data won't list in products page. I would like to add the ability to override or decorate original sample loading data in spree_sample/db/samples/

The fix will search in $LOAD_PATH and find last override #{samples}.rb and all decorate file #{samples}_decorator.rb in db/samples (which is the same path as origin)

I don't know how to add test for this since it need to install a fresh spree app and put overridden data.
However, I test in my local environment with these files:

override products to add TWD currency to products
my_app/db/samples/products.rb
decorate taxons.rb to add a new taxon
my_app/db/samples/taxons_decorator.rb

overridden data has beed loaded and I can see those record in db now.