diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-23 16:52:39 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-23 16:52:39 +0200 |
commit | 0744900861892be85b4a110612a8e92aed94d858 (patch) | |
tree | e879b3cd4d0839baaa0fb50f0927c6671b75ca11 /actionpack/test | |
parent | 6dd196914c293fbc1a331e4a0bc1c06a26dded43 (diff) | |
parent | 80f1f863cd0f9cba89079511282de5710a2e1832 (diff) | |
download | rails-0744900861892be85b4a110612a8e92aed94d858.tar.gz rails-0744900861892be85b4a110612a8e92aed94d858.tar.bz2 rails-0744900861892be85b4a110612a8e92aed94d858.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/activerecord/polymorphic_routes_test.rb | 9 | ||||
-rw-r--r-- | actionpack/test/template/capture_helper_test.rb | 15 |
2 files changed, 21 insertions, 3 deletions
diff --git a/actionpack/test/activerecord/polymorphic_routes_test.rb b/actionpack/test/activerecord/polymorphic_routes_test.rb index b9f5be2361..2036d1eeb5 100644 --- a/actionpack/test/activerecord/polymorphic_routes_test.rb +++ b/actionpack/test/activerecord/polymorphic_routes_test.rb @@ -234,10 +234,13 @@ class PolymorphicRoutesTest < ActionController::TestCase with_admin_test_routes do @project.save @task.save + + options = {} object_array = [:admin, @project, @task] - assert_no_difference 'object_array.size' do - polymorphic_url(object_array) - end + original_args = [object_array.dup, options.dup] + + assert_no_difference('object_array.size') { polymorphic_path(object_array, options) } + assert_equal original_args, [object_array, options] end end diff --git a/actionpack/test/template/capture_helper_test.rb b/actionpack/test/template/capture_helper_test.rb new file mode 100644 index 0000000000..2017a18806 --- /dev/null +++ b/actionpack/test/template/capture_helper_test.rb @@ -0,0 +1,15 @@ +require 'abstract_unit' + +class CaptureHelperTest < ActionView::TestCase + def setup + super + @_content_for = Hash.new {|h,k| h[k] = "" } + end + + def test_content_for + assert ! content_for?(:title) + content_for :title, 'title' + assert content_for?(:title) + assert ! content_for?(:something_else) + end +end |