aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/activerecord/polymorphic_routes_test.rb9
-rw-r--r--actionpack/test/template/capture_helper_test.rb15
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