@@ -130,10 +130,10 @@ def test_highlight
130
130
131
131
assert_equal ' ' , highlight ( ' ' , 'blank text is returned verbatim' )
132
132
end
133
-
133
+
134
134
def test_highlight_old_api_is_depcrecated
135
135
assert_deprecated ( "Calling highlight with a highlighter as an argument is deprecated. Please call with :highlighter => '<mark>\\ 1</mark>' instead." ) do
136
- highlight ( "This is a beautiful morning" , "beautiful" , '<mark>\1</mark>' )
136
+ highlight ( "This is a beautiful morning" , "beautiful" , '<mark>\1</mark>' )
137
137
end
138
138
end
139
139
@@ -205,13 +205,13 @@ def test_excerpt
205
205
assert_equal ( "...iful morning" , excerpt ( "This is a beautiful morning" , "morning" , :radius => 5 ) )
206
206
assert_nil excerpt ( "This is a beautiful morning" , "day" )
207
207
end
208
-
208
+
209
209
def test_excerpt_old_api_is_depcrecated
210
210
assert_deprecated ( "Calling excerpt with radius and omission as arguments is deprecated. Please call with :radius => 5 instead." ) do
211
- excerpt ( "This is a beautiful morning" , "morning" , 5 )
211
+ excerpt ( "This is a beautiful morning" , "morning" , 5 )
212
212
end
213
213
assert_deprecated ( "Calling excerpt with radius and omission as arguments is deprecated. Please call with :radius => 5, :omission => 'mor' instead." ) do
214
- excerpt ( "This is a beautiful morning" , "morning" , 5 , "mor" )
214
+ excerpt ( "This is a beautiful morning" , "morning" , 5 , "mor" )
215
215
end
216
216
end
217
217
@@ -253,10 +253,10 @@ def test_excerpt_with_omission
253
253
if RUBY_VERSION < '1.9'
254
254
def test_excerpt_with_utf8
255
255
with_kcode ( 'u' ) do
256
- assert_equal ( "...\357 \254 \203 ciency could not be..." , excerpt ( "That's why e\357 \254 \203 ciency could not be helped" , 'could' , :line_width => 8 ) )
256
+ assert_equal ( "...\357 \254 \203 ciency could not be..." , excerpt ( "That's why e\357 \254 \203 ciency could not be helped" , 'could' , :radius => 8 ) )
257
257
end
258
258
with_kcode ( 'none' ) do
259
- assert_equal ( "...\203 ciency could not be..." , excerpt ( "That's why e\357 \254 \203 ciency could not be helped" , 'could' , :line_width => 8 ) )
259
+ assert_equal ( "...\203 ciency could not be..." , excerpt ( "That's why e\357 \254 \203 ciency could not be helped" , 'could' , :radius => 8 ) )
260
260
end
261
261
end
262
262
else
@@ -270,7 +270,7 @@ def test_excerpt_with_utf8
270
270
def test_word_wrap
271
271
assert_equal ( "my very very\n very long\n string" , word_wrap ( "my very very very long string" , :line_width => 15 ) )
272
272
end
273
-
273
+
274
274
def test_word_wrap_old_api_is_depcrecated
275
275
assert_deprecated ( "Calling word_wrap with line_width as an argument is deprecated. Please call with :line_width => 15 instead." ) do
276
276
word_wrap ( "my very very very long string" , 15 )
0 commit comments