Skip to content

Commit 442f6d1

Browse files
hlcfanJonRowe
authored andcommitted
Correct return value of path_for in documentation (#1815)
Guess people forget this when working on #1402 #1402
1 parent dd74667 commit 442f6d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec/rails/view_path_builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def initialize(route_set)
1818
# @example
1919
# # path cannot be built because the params are missing a required element (:id)
2020
# view_path_builder.path_for({ :controller => 'posts', :action => 'delete' })
21-
# # => nil
21+
# # => ActionController::UrlGenerationError: No route matches {:action=>"delete", :controller=>"posts"}
2222
def path_for(path_params)
2323
url_for(path_params.merge(:only_path => true))
2424
rescue => e

0 commit comments

Comments
 (0)