Skip to content

Commit fc2480a

Browse files
rohitjosevalim
rohit
authored andcommitted
Fixed 1 failure and 2 errors in ActionPack testsuite [rails#4613 state:commited]
Signed-off-by: José Valim <[email protected]>
1 parent 3e84ea0 commit fc2480a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

actionpack/test/controller/assert_select_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def test_assert_select_text_match
211211
assert_nothing_raised { assert_select "div", "foo" }
212212
assert_nothing_raised { assert_select "div", "bar" }
213213
assert_nothing_raised { assert_select "div", /\w*/ }
214-
assert_nothing_raised { assert_select "div", /\w*/, :count=>2 }
214+
assert_nothing_raised { assert_select "div", :text => /\w*/, :count=>2 }
215215
assert_raise(Assertion) { assert_select "div", :text=>"foo", :count=>2 }
216216
assert_nothing_raised { assert_select "div", :html=>"<span>bar</span>" }
217217
assert_nothing_raised { assert_select "div", :html=>"<span>bar</span>" }
@@ -276,8 +276,8 @@ def test_elect_with_xml_namespace_attributes
276276

277277
def test_css_select
278278
render_html %Q{<div id="1"></div><div id="2"></div>}
279-
assert 2, css_select("div").size
280-
assert 0, css_select("p").size
279+
assert_equal 2, css_select("div").size
280+
assert_equal 0, css_select("p").size
281281
end
282282

283283
def test_nested_css_select

actionpack/test/controller/render_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ def test_render_against_etag_request_should_304_when_match
13881388
def test_render_against_etag_request_should_have_no_content_length_when_match
13891389
@request.if_none_match = etag_for("hello david")
13901390
get :render_hello_world_from_variable
1391-
assert !@response.headers.has_key?("Content-Length"), @response.headers['Content-Length']
1391+
assert !@response.headers.has_key?("Content-Length")
13921392
end
13931393

13941394
def test_render_against_etag_request_should_200_when_no_match
@@ -1524,4 +1524,4 @@ def test_last_modified_works_with_less_than_too
15241524
get :conditional_hello_with_bangs
15251525
assert_response :success
15261526
end
1527-
end
1527+
end

actionpack/test/template/capture_helper_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_with_output_buffer_sets_proper_encoding
7474
@av.output_buffer.force_encoding(alt_encoding)
7575

7676
@av.with_output_buffer do
77-
assert alt_encoding, @av.output_buffer.encoding
77+
assert_equal alt_encoding, @av.output_buffer.encoding
7878
end
7979
end
8080
end

0 commit comments

Comments
 (0)