Skip to content

Commit

Permalink
Update rails_stub_application.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
noelrappin committed Jan 22, 2024
1 parent 29be558 commit f6080c4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions spec/support/rails_stub_application.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
RSpec.configure do |config|
config.before(:example) do
without_partial_double_verification do
deprecators = ActiveSupport::Deprecation::Deprecators.new.tap do |deprecators|
deprecators[:rails] = ActiveSupport::Deprecation.new
if ActiveSupport.version >= Gem::Version.new("7.1.0")
without_partial_double_verification do
deprecators = ActiveSupport::Deprecation::Deprecators.new.tap do |deprecators|
deprecators[:rails] = ActiveSupport::Deprecation.new
end
mock_app = OpenStruct.new(deprecators: deprecators)
allow(Rails)
.to receive(:application)
.and_return(mock_app)
end
mock_app = OpenStruct.new(deprecators: deprecators)
allow(Rails)
.to receive(:application)
.and_return(mock_app)
WarningSigns::World.instance.rails_set_up
end
WarningSigns::World.instance.rails_set_up
end
end

Expand Down

0 comments on commit f6080c4

Please sign in to comment.