aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-11-28 12:49:07 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-28 12:50:09 -0800
commit4f2a04cc085b9117e8af8079a95a063f671d7a3d (patch)
treefd96c9bc52dc13d3338ed08f4afcd1c685dc6348 /actionpack
parent02893d17053123cbf02b65c2fe549421c11a2604 (diff)
downloadrails-4f2a04cc085b9117e8af8079a95a063f671d7a3d.tar.gz
rails-4f2a04cc085b9117e8af8079a95a063f671d7a3d.tar.bz2
rails-4f2a04cc085b9117e8af8079a95a063f671d7a3d.zip
Notifications: extract central Notifier, cordon off the internal Fanout implementation, and segregate instrumentation concerns
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/caching_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index 3ce90b6ccf..54de920740 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -632,13 +632,15 @@ class FragmentCachingTest < ActionController::TestCase
def test_fragment_for_logging
fragment_computed = false
- ActiveSupport::Notifications.queue.expects(:publish).times(2)
+ events = []
+ ActiveSupport::Notifications.subscribe { |*args| events << args }
buffer = 'generated till now -> '
@controller.fragment_for(buffer, 'expensive') { fragment_computed = true }
assert fragment_computed
assert_equal 'generated till now -> ', buffer
+ assert_equal [:fragment_exist?, :write_fragment], events.map(&:first)
end
end