Skip to content

Commit 4626f6e

Browse files
committed
Rails 5+ compatibility in tests
HTML::Node and related classes came from html-scanner within rails-deprecated_sanitizer, which is no longer a dependency of rails-dom-testing.
1 parent 628e25e commit 4626f6e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spec/view_helpers/action_view_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def renderer.gap() '<span class="my-gap">~~</span>' end
250250
end
251251

252252
it "should paginate with custom route page parameter" do
253-
request.symbolized_path_parameters.update :controller => 'dummy', :action => nil
253+
request.symbolized_path_parameters.update :controller => 'dummy', :action => 'index'
254254
paginate :per_page => 2 do
255255
assert_select 'a[href]', 6 do |links|
256256
assert_links_match %r{/page/(\d+)$}, links, [2, 3, 4, 5, 6, 2]
@@ -268,7 +268,7 @@ def renderer.gap() '<span class="my-gap">~~</span>' end
268268
end
269269

270270
it "should paginate with custom route and first page number implicit" do
271-
request.symbolized_path_parameters.update :controller => 'ibocorp', :action => nil
271+
request.symbolized_path_parameters.update :controller => 'ibocorp', :action => 'index'
272272
paginate :page => 2, :per_page => 2 do
273273
assert_select 'a[href]', 7 do |links|
274274
assert_links_match %r{/ibocorp(?:/(\d+))?$}, links, [nil, nil, 3, 4, 5, 6, 3]

spec/view_helpers/view_example_group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,4 @@ def inner_text
143143
childless?? '' : super
144144
end
145145
end
146-
end
146+
end if defined?(HTML)

0 commit comments

Comments
 (0)