From aca8e8492bbf5c592dfed42be0f4d30c9319dbfc Mon Sep 17 00:00:00 2001 From: rohit Date: Sun, 16 May 2010 13:34:46 +0200 Subject: [PATCH 1/2] Fixed 1 failure and 3 errors in ActionPack testsuite [#4613 state:commited] --- actionpack/test/controller/assert_select_test.rb | 6 +++--- actionpack/test/controller/render_test.rb | 4 ++-- actionpack/test/template/capture_helper_test.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/actionpack/test/controller/assert_select_test.rb b/actionpack/test/controller/assert_select_test.rb index f1254ab..7012c4c 100644 --- a/actionpack/test/controller/assert_select_test.rb +++ b/actionpack/test/controller/assert_select_test.rb @@ -211,7 +211,7 @@ class AssertSelectTest < ActionController::TestCase assert_nothing_raised { assert_select "div", "foo" } assert_nothing_raised { assert_select "div", "bar" } assert_nothing_raised { assert_select "div", /\w*/ } - assert_nothing_raised { assert_select "div", /\w*/, :count=>2 } + assert_nothing_raised { assert_select "div", :text => /\w*/, :count=>2 } assert_raise(Assertion) { assert_select "div", :text=>"foo", :count=>2 } assert_nothing_raised { assert_select "div", :html=>"bar" } assert_nothing_raised { assert_select "div", :html=>"bar" } @@ -276,8 +276,8 @@ class AssertSelectTest < ActionController::TestCase def test_css_select render_html %Q{
} - assert 2, css_select("div").size - assert 0, css_select("p").size + assert_equal 2, css_select("div").size + assert_equal 0, css_select("p").size end def test_nested_css_select diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 180d5e1..52049f2 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -1388,7 +1388,7 @@ class EtagRenderTest < ActionController::TestCase def test_render_against_etag_request_should_have_no_content_length_when_match @request.if_none_match = etag_for("hello david") get :render_hello_world_from_variable - assert !@response.headers.has_key?("Content-Length"), @response.headers['Content-Length'] + assert !@response.headers.has_key?("Content-Length") end def test_render_against_etag_request_should_200_when_no_match @@ -1524,4 +1524,4 @@ class LastModifiedRenderTest < ActionController::TestCase get :conditional_hello_with_bangs assert_response :success end -end \ No newline at end of file +end diff --git a/actionpack/test/template/capture_helper_test.rb b/actionpack/test/template/capture_helper_test.rb index bf541c1..9f3d68a 100644 --- a/actionpack/test/template/capture_helper_test.rb +++ b/actionpack/test/template/capture_helper_test.rb @@ -74,7 +74,7 @@ class CaptureHelperTest < ActionView::TestCase @av.output_buffer.force_encoding(alt_encoding) @av.with_output_buffer do - assert alt_encoding, @av.output_buffer.encoding + assert_equal alt_encoding, @av.output_buffer.encoding end end end -- 1.7.1 From d065ce475a812bd1e98ac08c5dafba5426d2062e Mon Sep 17 00:00:00 2001 From: Hussein Morsy Date: Sun, 16 May 2010 13:37:00 +0200 Subject: [PATCH 2/2] fixed 1 failure in ActionPack testsuite [#4613 state:resolved] --- actionpack/test/template/form_helper_test.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index 3893d15..d1e1338 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -449,8 +449,8 @@ class FormHelperTest < ActionView::TestCase text_area("post", "body", :id => nil) assert_dom_equal check_box("post", "secret", "id" => nil), check_box("post", "secret", :id => nil) - assert_dom_equal radio_button("post", "secret", "id" => nil), - radio_button("post", "secret", :id => nil) + assert_dom_equal radio_button("post", "secret", "0", "id" => nil), + radio_button("post", "secret", "0", :id => nil) end def test_index -- 1.7.1