Skip to content

Commit 4a45e4d

Browse files
Ryan ClarkSam Phippen
authored andcommitted
Add rescue message to url_for method
1 parent a0c52b0 commit 4a45e4d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rspec/rails/view_path_builder.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ def initialize(route_set)
2020
# view_path_builder.path_for({ :controller => 'posts', :action => 'delete' })
2121
# # => nil
2222
def path_for(path_params)
23-
url_for(path_params.merge(:only_path => true)) rescue nil
23+
url_for(path_params.merge(:only_path => true))
24+
rescue => e
25+
e.message
2426
end
2527
end
2628
end

0 commit comments

Comments
 (0)