Skip to content

Commit 13df8bb

Browse files
committed
Merge pull request #864 from rspec/fixup_view_caching
clear cached templates between specs Fixes the 2-99 build, see #864
1 parent a294ffd commit 13df8bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/rspec/rails/example/view_example_group.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ def _include_controller_helpers
152152
view.lookup_context.prefixes << _controller_path
153153
end
154154

155+
# fixes bug with differing formats
156+
view.lookup_context.view_paths.each(&:clear_cache)
157+
155158
controller.controller_path = _controller_path
156159
controller.request.path_parameters[:controller] = _controller_path
157160
controller.request.path_parameters[:action] = _inferred_action unless _inferred_action =~ /^_/

0 commit comments

Comments
 (0)