aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-18 14:00:00 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-18 14:00:00 -0700
commit38f6533792985dac7ad790225e72252ac3d8b51c (patch)
treee1c1b510bc83d994b345822aeaa601a37c64c7f3 /actionpack
parent1f6b0a554b945a02a08436bbd411ef95640b12ba (diff)
downloadrails-38f6533792985dac7ad790225e72252ac3d8b51c.tar.gz
rails-38f6533792985dac7ad790225e72252ac3d8b51c.tar.bz2
rails-38f6533792985dac7ad790225e72252ac3d8b51c.zip
argument error is done for us
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/Rakefile3
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
-rw-r--r--actionpack/test/template/form_helper_test.rb6
3 files changed, 8 insertions, 3 deletions
diff --git a/actionpack/Rakefile b/actionpack/Rakefile
index d67c6f2410..521ee6913a 100644
--- a/actionpack/Rakefile
+++ b/actionpack/Rakefile
@@ -18,7 +18,8 @@ Rake::TestTask.new(:test_action_pack) do |t|
# this will not happen automatically and the tests (as a whole) will error
t.test_files = Dir.glob('test/{abstract,controller,dispatch,template}/**/*_test.rb').sort
- # t.warning = true
+ #t.warning = true
+ t.verbose = true
end
namespace :test do
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 59d90f24f1..e62447c842 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -840,8 +840,6 @@ module ActionView
private
def instantiate_builder(record, record_object = nil, options = nil, &block)
- raise ArgumentError, "Missing block" unless block_given?
-
options, record_object = record_object, nil if record_object.is_a?(Hash)
options ||= {}
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index 348aa208c7..2f20bfa719 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -640,6 +640,12 @@ class FormHelperTest < ActionView::TestCase
)
end
+ def test_form_for_requires_block
+ assert_raises(ArgumentError) do
+ form_for(:post, @post, :html => { :id => 'create-post' })
+ end
+ end
+
def test_form_for
assert_deprecated do
form_for(:post, @post, :html => { :id => 'create-post' }) do |f|