aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-07-23 13:47:30 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-23 13:47:30 -0500
commit55adaa2efc08c892bf7be55d79ac571848068256 (patch)
tree1e52562f708f64d38ad95e57e42ab39c3ff82ab2 /actionpack/test
parente0db925be04ab3e9c3db67dd0daa8caf3680dd21 (diff)
downloadrails-55adaa2efc08c892bf7be55d79ac571848068256.tar.gz
rails-55adaa2efc08c892bf7be55d79ac571848068256.tar.bz2
rails-55adaa2efc08c892bf7be55d79ac571848068256.zip
Fixed bc5896e, and added test case for the caching bug it originally introduced.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/compiled_templates_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/test/template/compiled_templates_test.rb b/actionpack/test/template/compiled_templates_test.rb
index 52996c7fcb..e005aa0f03 100644
--- a/actionpack/test/template/compiled_templates_test.rb
+++ b/actionpack/test/template/compiled_templates_test.rb
@@ -30,9 +30,12 @@ uses_mocha 'TestTemplateRecompilation' do
assert_equal "Hello world!", render("test/hello_world.erb")
end
- def test_compiled_template_will_be_recompiled_when_rendered_if_template_is_outside_cache
+ def test_compiled_template_will_always_be_recompiled_when_eager_loaded_templates_is_off
+ ActionView::PathSet::Path.expects(:eager_load_templates?).times(4).returns(false)
assert_equal 0, @compiled_templates.instance_methods.size
assert_equal "Hello world!", render("#{FIXTURE_LOAD_PATH}/test/hello_world.erb")
+ ActionView::Template.any_instance.expects(:compile!).times(3)
+ 3.times { assert_equal "Hello world!", render("#{FIXTURE_LOAD_PATH}/test/hello_world.erb") }
assert_equal 1, @compiled_templates.instance_methods.size
end