Sha256: a2470b713b28166ad1c669f388fed1916a5e0255d8071488921bb55f72948751

Contents?: true

Size: 426 Bytes

Versions: 5

Compression:

Stored size: 426 Bytes

Contents

require "rails"
require "rspec/rails"

RSpec.configure do |config|

  config.around(:each, :caching) do |example|
    caching = ActionController::Base.perform_caching
    ActionController::Base.perform_caching = example.metadata[:caching]
    example.run
    ActionController::Base.perform_caching = caching
  end

  config.before(:each) do
    Rails.cache.clear
  end

  config.after(:all) do
    Rails.cache.clear
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
okei-1.0.2 spec/support/initializers/caching.rb
okei-1.0.1 spec/support/initializers/caching.rb
okei-1.0.0 spec/support/initializers/caching.rb
okei-1.0.0.pre.rc spec/support/initializers/caching.rb
okei-0.0.2 spec/support/initializers/caching.rb