Skip to content

Commit 00c685d

Browse files
authored
Replace OpenStruct dependency with Struct
#2754 (comment)
1 parent 8cee7cb commit 00c685d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spec/rspec/rails/example/view_example_group_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require 'ostruct'
21
require 'support/group_failure_formatter'
32

43
module RSpec::Rails
@@ -188,7 +187,7 @@ def _default_file_to_render; end # Stub method
188187
Class.new do
189188
include ViewExampleGroup::ExampleMethods
190189
def controller
191-
@controller ||= ::OpenStruct.new(params: nil)
190+
@controller ||= Struct.new(:params).new(nil)
192191
end
193192
end.new
194193
end

0 commit comments

Comments
 (0)