mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Minor typo fixes
This commit is contained in:
parent
42c28544e1
commit
499b602c8e
4 changed files with 6 additions and 6 deletions
|
@ -115,7 +115,7 @@ module ActionView
|
||||||
# e.g. if there are 20 leap year days between 2 dates having the same day
|
# e.g. if there are 20 leap year days between 2 dates having the same day
|
||||||
# and month then the based on 365 days calculation
|
# and month then the based on 365 days calculation
|
||||||
# the distance in years will come out to over 80 years when in written
|
# the distance in years will come out to over 80 years when in written
|
||||||
# english it would read better as about 80 years.
|
# English it would read better as about 80 years.
|
||||||
minutes_with_offset = distance_in_minutes - minute_offset_for_leap_year
|
minutes_with_offset = distance_in_minutes - minute_offset_for_leap_year
|
||||||
else
|
else
|
||||||
minutes_with_offset = distance_in_minutes
|
minutes_with_offset = distance_in_minutes
|
||||||
|
|
|
@ -214,19 +214,19 @@ module AbstractControllerTests
|
||||||
assert_equal "With String Hello string!", controller.response_body
|
assert_equal "With String Hello string!", controller.response_body
|
||||||
end
|
end
|
||||||
|
|
||||||
test "when layout is overwriten by :default in render, render default layout" do
|
test "when layout is overwritten by :default in render, render default layout" do
|
||||||
controller = WithString.new
|
controller = WithString.new
|
||||||
controller.process(:overwrite_default)
|
controller.process(:overwrite_default)
|
||||||
assert_equal "With String Hello string!", controller.response_body
|
assert_equal "With String Hello string!", controller.response_body
|
||||||
end
|
end
|
||||||
|
|
||||||
test "when layout is overwriten by string in render, render new layout" do
|
test "when layout is overwritten by string in render, render new layout" do
|
||||||
controller = WithString.new
|
controller = WithString.new
|
||||||
controller.process(:overwrite_string)
|
controller.process(:overwrite_string)
|
||||||
assert_equal "Overwrite Hello string!", controller.response_body
|
assert_equal "Overwrite Hello string!", controller.response_body
|
||||||
end
|
end
|
||||||
|
|
||||||
test "when layout is overwriten by false in render, render no layout" do
|
test "when layout is overwritten by false in render, render no layout" do
|
||||||
controller = WithString.new
|
controller = WithString.new
|
||||||
controller.process(:overwrite_false)
|
controller.process(:overwrite_false)
|
||||||
assert_equal "Hello string!", controller.response_body
|
assert_equal "Hello string!", controller.response_body
|
||||||
|
|
|
@ -992,7 +992,7 @@ class RenderTest < ActionController::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_should_render_formatted_html_erb_template_with_faulty_accepts_header
|
def test_should_render_formatted_html_erb_template_with_faulty_accepts_header
|
||||||
@request.accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, appliction/x-shockwave-flash, */*"
|
@request.accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*"
|
||||||
get :formatted_xml_erb
|
get :formatted_xml_erb
|
||||||
assert_equal '<test>passed formatted html erb</test>', @response.body
|
assert_equal '<test>passed formatted html erb</test>', @response.body
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,7 +31,7 @@ class ErbUtilTest < ActiveSupport::TestCase
|
||||||
assert escaped.html_safe?
|
assert escaped.html_safe?
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_html_escape_passes_html_escpe_unmodified
|
def test_html_escape_passes_html_escape_unmodified
|
||||||
escaped = h("<p>".html_safe)
|
escaped = h("<p>".html_safe)
|
||||||
assert_equal "<p>", escaped
|
assert_equal "<p>", escaped
|
||||||
assert escaped.html_safe?
|
assert escaped.html_safe?
|
||||||
|
|
Loading…
Reference in a new issue