spree/spree — pull request #2960 by balexand (2013-05-02 01:02:42+00:00)
Title: Fix variant factory when Spree::Config[:track_inventory_levels] = false

If `Spree::Config[:track_inventory_levels] = false` and you call `FactoryGirl.create(:variant)`, then [this line](https://github.com/spree/spree/blob/4e4085d99051c36a559b95f7864c7987168194bd/core/app/models/spree/variant.rb#L60) raises an exception. The solution is to only call `on_hand=` if `Spree::Config[:track_inventory_levels]` is `true`.