Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sentry-rails/lib/sentry/rails/overrides/streaming_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module Sentry
module Rails
module Overrides
module StreamingReporter
private

def log_error(exception)
Sentry::Rails.capture_exception(exception)
super
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

require 'spec_helper'
require 'sentry/rails/overrides/streaming_reporter'

RSpec.describe Sentry::Rails::Overrides::StreamingReporter do
it "keeps ActionController::Live's private method private when prepended" do
live_module = Module.new do
private

def log_error(_exception)
end
end
live_module.prepend(described_class)
controller_class = Class.new { include live_module }

expect(controller_class.public_method_defined?(:log_error)).to be(false)
expect(controller_class.private_method_defined?(:log_error)).to be(true)
end
end