Sha256: 1c4df1d23f3fc9b0d4304578c099d347574aa77356c529bf45a3b00a312834fe
Contents?: true
Size: 842 Bytes
Versions: 28
Compression:
Stored size: 842 Bytes
Contents
module Spree module TestingSupport module Preferences # Resets all preferences to default values, you can # pass a block to override the defaults with a block # # reset_spree_preferences do |config| # config.track_inventory_levels = false # end # def reset_spree_preferences(&config_block) Spree::Config.preference_store = Spree::Config.default_preferences configure_spree_preferences(&config_block) if block_given? end def configure_spree_preferences config = Rails.application.config.spree.preferences yield(config) if block_given? end def assert_preference_unset(preference) find("#preferences_#{preference}")['checked'].should be false Spree::Config[preference].should be false end end end end
Version data entries
28 entries across 28 versions & 1 rubygems