Skip to content

Commit

Permalink
Merge pull request #2754 from javierjulio/patch-3
Browse files Browse the repository at this point in the history
Fix uninitialized constant RSpec::Rails::OpenStruct error
  • Loading branch information
pirj authored Apr 8, 2024
2 parents 967a54d + 9631355 commit 8cee7cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/rspec/rails/example/view_example_group_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'ostruct'
require 'support/group_failure_formatter'

module RSpec::Rails
Expand Down Expand Up @@ -187,7 +188,7 @@ def _default_file_to_render; end # Stub method
Class.new do
include ViewExampleGroup::ExampleMethods
def controller
@controller ||= OpenStruct.new(params: nil)
@controller ||= ::OpenStruct.new(params: nil)
end
end.new
end
Expand Down

0 comments on commit 8cee7cb

Please sign in to comment.