Skip to content

Instantly share code, notes, and snippets.

@dabit
Created September 29, 2012 17:55
Show Gist options
  • Save dabit/3804717 to your computer and use it in GitHub Desktop.
Save dabit/3804717 to your computer and use it in GitHub Desktop.
Spec for the spree issue
require 'spec_helper'
describe Spree::Config do
before do
ActionController::Base.perform_caching = true
# config.cache_store = :dalli_store, { expires_in: 5.seconds }
end
it "Should fallback to database if cache keys expire" do
Spree::Config.featured_sale_id = 10
Rails.cache.clear
sleep 30
Spree::Config.featured_sale_id.should eq 10
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment