Skip to content
Permalink
Browse files
Merge branch 'extract_observers'
  • Loading branch information
rafaelfranca committed Nov 29, 2012
2 parents e38d310 + f862376 commit 39e85b3
Show file tree
Hide file tree
Showing 39 changed files with 26 additions and 1,961 deletions.
@@ -6,10 +6,10 @@ module ActionController
# \Caching is a cheap way of speeding up slow applications by keeping the result of
# calculations, renderings, and database calls around for subsequent requests.
#
# You can read more about each approach and the sweeping assistance by clicking the
# You can read more about each approach and the by clicking the
# modules below.
#
# Note: To turn off all caching and sweeping, set
# Note: To turn off all caching, set
# config.action_controller.perform_caching = false.
#
# == \Caching stores
@@ -30,8 +30,6 @@ module Caching

eager_autoload do
autoload :Fragments
autoload :Sweeper, 'action_controller/caching/sweeping'
autoload :Sweeping, 'action_controller/caching/sweeping'
end

module ConfigMethods
@@ -54,7 +52,6 @@ def cache_configured?

include ConfigMethods
include Fragments
include Sweeping if defined?(ActiveRecord)

included do
extend ConfigMethods

This file was deleted.

@@ -25,7 +25,6 @@
require 'active_model'
require 'active_record'
require 'action_controller/caching'
require 'action_controller/caching/sweeping'

require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late

@@ -499,18 +499,6 @@ def filter_three

end

class ::AppSweeper < ActionController::Caching::Sweeper; end
class SweeperTestController < ActionController::Base
cache_sweeper :app_sweeper
def show
render :text => 'hello world'
end

def error
raise StandardError.new
end
end

class ImplicitActionsController < ActionController::Base
before_filter :find_only, :only => :edit
before_filter :find_except, :except => :edit
@@ -526,35 +514,6 @@ def find_except
end
end

def test_sweeper_should_not_ignore_no_method_error
sweeper = ActionController::Caching::Sweeper.send(:new)
assert_raise NoMethodError do
sweeper.send_not_defined
end
end

def test_sweeper_should_not_block_rendering
response = test_process(SweeperTestController)
assert_equal 'hello world', response.body
end

def test_sweeper_should_clean_up_if_exception_is_raised
assert_raise StandardError do
test_process(SweeperTestController, 'error')
end
assert_nil AppSweeper.instance.controller
end

def test_before_method_of_sweeper_should_always_return_true
sweeper = ActionController::Caching::Sweeper.send(:new)
assert sweeper.before(TestController.new)
end

def test_after_method_of_sweeper_should_always_return_nil
sweeper = ActionController::Caching::Sweeper.send(:new)
assert_nil sweeper.after(TestController.new)
end

def test_non_yielding_around_filters_not_returning_false_do_not_raise
controller = NonYieldingAroundFilterController.new
controller.instance_variable_set "@filter_return_value", true

This file was deleted.

@@ -40,8 +40,6 @@ module ActiveModel
autoload :DeprecatedMassAssignmentSecurity
autoload :Name, 'active_model/naming'
autoload :Naming
autoload :Observer, 'active_model/observing'
autoload :Observing
autoload :SecurePassword
autoload :Serialization
autoload :TestCase

This file was deleted.

0 comments on commit 39e85b3

Please sign in to comment.