exception_handling 2.7.0.pre.1 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.jenkins/Jenkinsfile +24 -8
  4. data/.rspec +3 -0
  5. data/CHANGELOG.md +2 -2
  6. data/Gemfile +4 -4
  7. data/Gemfile.lock +65 -56
  8. data/Rakefile +7 -6
  9. data/gemfiles/rails_4.gemfile +4 -4
  10. data/gemfiles/rails_5.gemfile +4 -4
  11. data/gemfiles/rails_6.gemfile +4 -4
  12. data/lib/exception_handling/log_stub_error.rb +2 -1
  13. data/lib/exception_handling/logging_methods.rb +1 -7
  14. data/lib/exception_handling/version.rb +1 -1
  15. data/{test → spec}/helpers/controller_helpers.rb +0 -0
  16. data/{test → spec}/helpers/exception_helpers.rb +2 -2
  17. data/{test → spec}/rake_test_warning_false.rb +0 -0
  18. data/{test/test_helper.rb → spec/spec_helper.rb} +50 -39
  19. data/spec/unit/exception_handling/exception_catalog_spec.rb +85 -0
  20. data/spec/unit/exception_handling/exception_description_spec.rb +82 -0
  21. data/{test/unit/exception_handling/exception_info_test.rb → spec/unit/exception_handling/exception_info_spec.rb} +105 -107
  22. data/{test/unit/exception_handling/honeybadger_callbacks_test.rb → spec/unit/exception_handling/honeybadger_callbacks_spec.rb} +20 -20
  23. data/{test/unit/exception_handling/log_error_stub_test.rb → spec/unit/exception_handling/log_error_stub_spec.rb} +38 -22
  24. data/{test/unit/exception_handling/logging_methods_test.rb → spec/unit/exception_handling/logging_methods_spec.rb} +8 -7
  25. data/{test/unit/exception_handling/mailer_test.rb → spec/unit/exception_handling/mailer_spec.rb} +17 -17
  26. data/spec/unit/exception_handling/methods_spec.rb +105 -0
  27. data/spec/unit/exception_handling/sensu_spec.rb +51 -0
  28. data/{test/unit/exception_handling_test.rb → spec/unit/exception_handling_spec.rb} +325 -329
  29. metadata +36 -35
  30. data/test/unit/exception_handling/exception_catalog_test.rb +0 -85
  31. data/test/unit/exception_handling/exception_description_test.rb +0 -82
  32. data/test/unit/exception_handling/methods_test.rb +0 -105
  33. data/test/unit/exception_handling/sensu_test.rb +0 -52
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require File.expand_path('../../test_helper', __dir__)
3
+ require File.expand_path('../../spec_helper', __dir__)
4
4
 
5
5
  module ExceptionHandling
6
- class HoneybadgerCallbacksTest < ActiveSupport::TestCase
6
+ describe HoneybadgerCallbacks do
7
7
 
8
8
  class TestPoroWithAttribute
9
9
  attr_reader :test_attribute
@@ -55,15 +55,15 @@ module ExceptionHandling
55
55
  end
56
56
 
57
57
  context "register_callbacks" do
58
- should "store the callbacks in the honeybadger object" do
58
+ it "store the callbacks in the honeybadger object" do
59
59
  HoneybadgerCallbacks.register_callbacks
60
60
  result = Honeybadger.config.local_variable_filter.call(:variable_name, 'test', [])
61
- assert_equal('test', result)
61
+ expect(result).to eq('test')
62
62
  end
63
63
  end
64
64
 
65
65
  context "local_variable_filter" do
66
- should "not inspect String, Hash, Array, Set, Numeric, TrueClass, FalseClass, NilClass" do
66
+ it "not inspect String, Hash, Array, Set, Numeric, TrueClass, FalseClass, NilClass" do
67
67
  [
68
68
  ['test', String],
69
69
  [{ a: 1 }, Hash],
@@ -75,46 +75,46 @@ module ExceptionHandling
75
75
  [nil, NilClass]
76
76
  ].each do |object, expected_class|
77
77
  result = HoneybadgerCallbacks.send(:local_variable_filter, :variable_name, object, [])
78
- assert result.is_a?(expected_class), "Expected #{expected_class.name} but got #{result.class.name}"
78
+ expect(result.is_a?(expected_class)).to be_truthy
79
79
  end
80
80
  end
81
81
 
82
- should "inspect other classes" do
82
+ it "inspect other classes" do
83
83
  result = HoneybadgerCallbacks.send(:local_variable_filter, :variable_name, TestPoroWithAttribute.new, ['password'])
84
- assert_match(/#<ExceptionHandling::HoneybadgerCallbacksTest::TestPoroWithAttribute:.* @test_attribute="test">/, result)
84
+ expect(result).to match(/#<ExceptionHandling::TestPoroWithAttribute:.* @test_attribute="test">/)
85
85
  end
86
86
 
87
87
  context "when inspect raises exceptions" do
88
- should "handle exceptions for objects" do
88
+ it "handle exceptions for objects" do
89
89
  result = HoneybadgerCallbacks.send(:local_variable_filter, :variable_name, TestRaiseOnInspect.new, ['password'])
90
- assert_equal "#<ExceptionHandling::HoneybadgerCallbacksTest::TestRaiseOnInspect [error 'RuntimeError: some error' while calling #inspect]>", result
90
+ expect(result).to eq("#<ExceptionHandling::TestRaiseOnInspect [error 'RuntimeError: some error' while calling #inspect]>")
91
91
  end
92
92
 
93
- should "handle exceptions for objects responding to id" do
93
+ it "handle exceptions for objects responding to id" do
94
94
  result = HoneybadgerCallbacks.send(:local_variable_filter, :variable_name, TestRaiseOnInspectWithId.new, ['password'])
95
- assert_equal "#<ExceptionHandling::HoneybadgerCallbacksTest::TestRaiseOnInspectWithId @id=123 [error 'RuntimeError: some error' while calling #inspect]>", result
95
+ expect(result).to eq("#<ExceptionHandling::TestRaiseOnInspectWithId @id=123 [error 'RuntimeError: some error' while calling #inspect]>")
96
96
  end
97
97
 
98
- should "handle exceptions for objects responding to to_pk" do
98
+ it "handle exceptions for objects responding to to_pk" do
99
99
  result = HoneybadgerCallbacks.send(:local_variable_filter, :variable_name, TestRaiseOnInspectWithToPk.new, ['password'])
100
- assert_equal "#<ExceptionHandling::HoneybadgerCallbacksTest::TestRaiseOnInspectWithToPk @pk=SomeRecord-123 [error 'RuntimeError: some error' while calling #inspect]>", result
100
+ expect(result).to eq("#<ExceptionHandling::TestRaiseOnInspectWithToPk @pk=SomeRecord-123 [error 'RuntimeError: some error' while calling #inspect]>")
101
101
  end
102
102
  end
103
103
 
104
104
  context "not inspect objects that contain filter keys" do
105
- should "use to_pk if available, even if id is available" do
105
+ it "use to_pk if available, even if id is available" do
106
106
  result = HoneybadgerCallbacks.send(:local_variable_filter, :variable_name, TestPoroWithFilteredAttributePkAndId.new, ['password'])
107
- assert_match(/#<ExceptionHandling::HoneybadgerCallbacksTest::TestPoroWithFilteredAttributePkAndId @pk=TestPoroWithFilteredAttributePkAndId_1, \[FILTERED\]>/, result)
107
+ expect(result).to match(/#<ExceptionHandling::TestPoroWithFilteredAttributePkAndId @pk=TestPoroWithFilteredAttributePkAndId_1, \[FILTERED\]>/)
108
108
  end
109
109
 
110
- should "use id if to_pk is not available" do
110
+ it "use id if to_pk is not available" do
111
111
  result = HoneybadgerCallbacks.send(:local_variable_filter, :variable_name, TestPoroWithFilteredAttributeAndId.new, ['password'])
112
- assert_match(/#<ExceptionHandling::HoneybadgerCallbacksTest::TestPoroWithFilteredAttributeAndId @id=1, \[FILTERED\]>/, result)
112
+ expect(result).to match(/#<ExceptionHandling::TestPoroWithFilteredAttributeAndId @id=1, \[FILTERED\]>/)
113
113
  end
114
114
 
115
- should "print the object name if no id or to_pk" do
115
+ it "print the object name if no id or to_pk" do
116
116
  result = HoneybadgerCallbacks.send(:local_variable_filter, :variable_name, TestPoroWithFilteredAttribute.new, ['password'])
117
- assert_match(/#<ExceptionHandling::HoneybadgerCallbacksTest::TestPoroWithFilteredAttribute \[FILTERED\]>/, result)
117
+ expect(result).to match(/#<ExceptionHandling::TestPoroWithFilteredAttribute \[FILTERED\]>/)
118
118
  end
119
119
  end
120
120
  end
@@ -1,27 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require File.expand_path('../../test_helper', __dir__)
3
+ require File.expand_path('../../spec_helper', __dir__)
4
4
 
5
5
  module ExceptionHandling
6
- class LogErrorStubTest < ActiveSupport::TestCase
6
+ describe LogErrorStub do
7
7
 
8
8
  include LogErrorStub
9
9
 
10
10
  context "while running tests" do
11
- setup do
11
+ before do
12
12
  setup_log_error_stub
13
13
  end
14
14
 
15
- teardown do
15
+ after do
16
16
  teardown_log_error_stub
17
17
  end
18
18
 
19
- should "raise an error when log_error and log_warning are called" do
19
+ it "raise an error when log_error and log_warning are called" do
20
20
  begin
21
21
  ExceptionHandling.log_error("Something happened")
22
22
  flunk
23
23
  rescue Exception => ex # LogErrorStub::UnexpectedExceptionLogged => ex
24
- assert ex.to_s.starts_with?("StandardError: Something happened"), ex.to_s
24
+ expect(ex.to_s.starts_with?("StandardError: Something happened")).to be_truthy
25
25
  end
26
26
 
27
27
  begin
@@ -31,16 +31,16 @@ module ExceptionHandling
31
31
  begin
32
32
  ExceptionHandling.log_error(ex)
33
33
  rescue LogErrorStub::UnexpectedExceptionLogged => ex
34
- assert ex.to_s.starts_with?("RaisedError: This should raise"), ex.to_s
34
+ expect(ex.to_s.starts_with?("RaisedError: This should raise")).to be_truthy
35
35
  end
36
36
  end
37
37
  end
38
38
 
39
- should "allow for the regex specification of an expected exception to be ignored" do
39
+ it "allow for the regex specification of an expected exception to be ignored" do
40
40
  exception_pattern = /StandardError: This is a test error/
41
- assert_nil exception_whitelist # test that exception expectations are cleared
41
+ expect(exception_whitelist).to be_nil # test that exception expectations are cleared
42
42
  expects_exception(exception_pattern)
43
- assert_equal exception_pattern, exception_whitelist[0][0]
43
+ expect(exception_whitelist[0][0]).to eq(exception_pattern)
44
44
  begin
45
45
  ExceptionHandling.log_error("This is a test error")
46
46
  rescue StandardError
@@ -48,11 +48,11 @@ module ExceptionHandling
48
48
  end
49
49
  end
50
50
 
51
- should "allow for the string specification of an expected exception to be ignored" do
51
+ it "allow for the string specification of an expected exception to be ignored" do
52
52
  exception_pattern = "StandardError: This is a test error"
53
- assert_nil exception_whitelist # test that exception expectations are cleared
53
+ expect(exception_whitelist).to be_nil # test that exception expectations are cleared
54
54
  expects_exception(exception_pattern)
55
- assert_equal exception_pattern, exception_whitelist[0][0]
55
+ expect(exception_whitelist[0][0]).to eq(exception_pattern)
56
56
  begin
57
57
  ExceptionHandling.log_error("This is a test error")
58
58
  rescue StandardError
@@ -60,9 +60,9 @@ module ExceptionHandling
60
60
  end
61
61
  end
62
62
 
63
- should "allow multiple errors to be ignored" do
63
+ it "allow multiple errors to be ignored" do
64
64
  class IgnoredError < StandardError; end
65
- assert_nil exception_whitelist # test that exception expectations are cleared
65
+ expect(exception_whitelist).to be_nil # test that exception expectations are cleared
66
66
  expects_exception(/StandardError: This is a test error/)
67
67
  expects_exception(/IgnoredError: This should be ignored/)
68
68
  ExceptionHandling.log_error("This is a test error")
@@ -73,7 +73,7 @@ module ExceptionHandling
73
73
  end
74
74
  end
75
75
 
76
- should "expect exception twice if declared twice" do
76
+ it "expect exception twice if declared twice" do
77
77
  expects_exception(/StandardError: ERROR: I love lamp/)
78
78
  expects_exception(/StandardError: ERROR: I love lamp/)
79
79
  ExceptionHandling.log_error("ERROR: I love lamp")
@@ -82,23 +82,39 @@ module ExceptionHandling
82
82
  end
83
83
 
84
84
  context "teardown_log_error_stub" do
85
- should "support MiniTest framework for adding a failure" do
85
+ before do
86
+ RSpec.configure do |config|
87
+ config.mock_with :rspec do |mocks|
88
+ mocks.verify_partial_doubles = false
89
+ end
90
+ end
91
+ end
92
+
93
+ after do
94
+ RSpec.configure do |config|
95
+ config.mock_with :rspec do |mocks|
96
+ mocks.verify_partial_doubles = true
97
+ end
98
+ end
99
+ end
100
+
101
+ it "support MiniTest framework for adding a failure" do
86
102
  expects_exception(/foo/)
87
103
 
88
- mock(self).is_mini_test?.returns { true }
104
+ expect(self).to receive(:is_mini_test?) { true }
89
105
 
90
- mock(self).flunk("log_error expected 1 times with pattern: 'foo' found 0")
106
+ expect(self).to receive(:flunk).with("log_error expected 1 times with pattern: 'foo' found 0")
91
107
  teardown_log_error_stub
92
108
 
93
109
  self.exception_whitelist = nil
94
110
  end
95
111
 
96
- should "support Test::Unit framework for adding a failure" do
112
+ it "support Test::Unit framework for adding a failure" do
97
113
  expects_exception(/foo/)
98
114
 
99
- mock(self).is_mini_test?.returns { false }
115
+ expect(self).to receive(:is_mini_test?) { false }
100
116
 
101
- mock(self).add_failure("log_error expected 1 times with pattern: 'foo' found 0")
117
+ expect(self).to receive(:add_failure).with("log_error expected 1 times with pattern: 'foo' found 0")
102
118
  teardown_log_error_stub
103
119
 
104
120
  self.exception_whitelist = nil
@@ -1,12 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../../test_helper'
3
+ require File.expand_path('../../spec_helper', __dir__)
4
+
4
5
  require_relative '../../helpers/exception_helpers'
5
6
 
6
7
  require "exception_handling/testing"
7
8
 
8
9
  module ExceptionHandling
9
- class LoggingMethodsTest < ActiveSupport::TestCase
10
+ describe LoggingMethods do
10
11
  include ExceptionHelpers
11
12
 
12
13
  def dont_stub_log_error
@@ -14,21 +15,21 @@ module ExceptionHandling
14
15
  end
15
16
 
16
17
  context "ExceptionHandling::LoggingMethods" do
17
- setup do
18
+ before do
18
19
  @controller = Testing::LoggingMethodsControllerStub.new
19
20
  ExceptionHandling.stub_handler = nil
20
21
  end
21
22
 
22
23
  context "#log_warning" do
23
- should "be available to the controller" do
24
+ it "be available to the controller" do
24
25
  klass = Class.new
25
26
  klass.include ExceptionHandling::LoggingMethods
26
27
  instance = klass.new
27
- assert instance.methods.include?(:log_warning)
28
+ expect(instance.methods.include?(:log_warning)).to eq(true)
28
29
  end
29
30
 
30
- should "call ExceptionHandling#log_warning" do
31
- mock(ExceptionHandling).log_warning("Hi mom")
31
+ it "call ExceptionHandling#log_warning" do
32
+ expect(ExceptionHandling).to receive(:log_warning).with("Hi mom")
32
33
  @controller.send(:log_warning, "Hi mom")
33
34
  end
34
35
  end
@@ -1,19 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require File.expand_path('../../test_helper', __dir__)
3
+ require File.expand_path('../../spec_helper', __dir__)
4
+ require 'rails-dom-testing'
4
5
 
5
6
  module ExceptionHandling
6
- class MailerTest < ActionMailer::TestCase
7
+ describe Mailer do
7
8
 
8
9
  include ::Rails::Dom::Testing::Assertions::SelectorAssertions
9
- tests ExceptionHandling::Mailer
10
10
 
11
11
  def dont_stub_log_error
12
12
  true
13
13
  end
14
14
 
15
15
  context "ExceptionHandling::Mailer" do
16
- setup do
16
+ before do
17
17
  ExceptionHandling.email_environment = 'Test'
18
18
  ExceptionHandling.sender_address = %("Test Exception Mailer" <null_exception@invoca.com>)
19
19
  ExceptionHandling.exception_recipients = ['test_exception@invoca.com']
@@ -21,22 +21,22 @@ module ExceptionHandling
21
21
  end
22
22
 
23
23
  context "log_parser_exception_notification" do
24
- should "send with string" do
24
+ it "send with string" do
25
25
  result = ExceptionHandling::Mailer.log_parser_exception_notification("This is my fake error", "My Fake Subj").deliver_now
26
- assert_equal "Test exception: My Fake Subj: This is my fake error", result.subject
27
- assert_match(/This is my fake error/, result.body.to_s)
26
+ expect(result.subject).to eq("Test exception: My Fake Subj: This is my fake error")
27
+ expect(result.body.to_s).to match(/This is my fake error/)
28
28
  assert_emails 1
29
29
  end
30
30
  end
31
31
 
32
32
  context "escalation_notification" do
33
- setup do
33
+ before do
34
34
  def document_root_element
35
35
  @body_html.root
36
36
  end
37
37
  end
38
38
 
39
- should "send all the information" do
39
+ it "send all the information" do
40
40
  ExceptionHandling.email_environment = 'Staging Full'
41
41
  ExceptionHandling.server_name = 'test-fe3'
42
42
 
@@ -46,8 +46,8 @@ module ExceptionHandling
46
46
  result = ActionMailer::Base.deliveries.last
47
47
  @body_html = Nokogiri::HTML(result.body.to_s)
48
48
  assert_equal_with_diff ['test_escalation@invoca.com'], result.to
49
- assert_equal ["Test Escalation Mailer <null_escalation@invoca.com>"], result[:from].formatted
50
- assert_equal "Staging Full Escalation: Your Favorite <b>Feature<b> Failed", result.subject
49
+ expect(result[:from].formatted).to eq(["Test Escalation Mailer <null_escalation@invoca.com>"])
50
+ expect(result.subject).to eq("Staging Full Escalation: Your Favorite <b>Feature<b> Failed")
51
51
  assert_select "title", "Exception Escalation"
52
52
  assert_select "html" do
53
53
  assert_select "body br", { count: 4 }, result.body.to_s # plus 1 for the multiline summary
@@ -60,13 +60,13 @@ module ExceptionHandling
60
60
  end
61
61
  end
62
62
 
63
- should "use defaults for missing fields" do
63
+ it "use defaults for missing fields" do
64
64
  result = ExceptionHandling::Mailer.escalation_notification("Your Favorite Feature Failed", error_string: "It failed because of an error\n More Info")
65
65
  @body_html = Nokogiri::HTML(result.body.to_s)
66
66
 
67
67
  assert_equal_with_diff ['test_escalation@invoca.com'], result.to
68
- assert_equal ["null_escalation@invoca.com"], result.from
69
- assert_equal 'Test Escalation: Your Favorite Feature Failed', result.subject
68
+ expect(result.from).to eq(["null_escalation@invoca.com"])
69
+ expect(result.subject).to eq('Test Escalation: Your Favorite Feature Failed')
70
70
  assert_select "html" do
71
71
  assert_select "body i", true, result.body.to_s do |is|
72
72
  assert_select is, "i", 'no error #'
@@ -75,11 +75,11 @@ module ExceptionHandling
75
75
  end
76
76
 
77
77
  context "ExceptionHandling.escalate_to_production_support" do
78
- setup do
78
+ before do
79
79
  Time.now_override = Time.parse('1986-5-21 4:17 am UTC')
80
80
  end
81
81
 
82
- should "notify production support" do
82
+ it "notify production support" do
83
83
  subject = "Runtime Error found!"
84
84
  exception = RuntimeError.new("Test")
85
85
  recipients = ["prodsupport@example.com"]
@@ -87,7 +87,7 @@ module ExceptionHandling
87
87
  ExceptionHandling.production_support_recipients = recipients
88
88
  ExceptionHandling.last_exception_timestamp = Time.now.to_i
89
89
 
90
- mock(ExceptionHandling).escalate(subject, exception, Time.now.to_i, recipients)
90
+ expect(ExceptionHandling).to receive(:escalate).with(subject, exception, Time.now.to_i, recipients)
91
91
  ExceptionHandling.escalate_to_production_support(exception, subject)
92
92
  end
93
93
  end
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path('../../spec_helper', __dir__)
4
+
5
+ require "exception_handling/testing"
6
+ require_relative '../../helpers/exception_helpers.rb'
7
+
8
+ module ExceptionHandling
9
+ describe Methods do
10
+ include ExceptionHelpers
11
+
12
+ def dont_stub_log_error
13
+ true
14
+ end
15
+
16
+ context "ExceptionHandling::Methods" do
17
+ before do
18
+ @controller = Testing::MethodsControllerStub.new
19
+ ExceptionHandling.stub_handler = nil
20
+ end
21
+
22
+ it "set the around filter" do
23
+ expect(Testing::MethodsControllerStub.around_filter_method).to eq(:set_current_controller)
24
+ expect(ExceptionHandling.current_controller).to be_nil
25
+ @controller.simulate_around_filter do
26
+ expect(ExceptionHandling.current_controller).to eq(@controller)
27
+ end
28
+ expect(ExceptionHandling.current_controller).to be_nil
29
+ end
30
+
31
+ it "use the current_controller when available" do
32
+ capture_notifications
33
+
34
+ expect(ExceptionHandling.logger).to receive(:fatal).with(/blah/, anything).at_least(:once)
35
+ @controller.simulate_around_filter do
36
+ ExceptionHandling.log_error(ArgumentError.new("blah"))
37
+ expect(sent_notifications.size).to eq(1)
38
+ expect(/#{Regexp.new(Regexp.escape(@controller.request.request_uri))}/).to match(sent_notifications.last.enhanced_data['request'].to_s)
39
+ end
40
+ end
41
+
42
+ it "report long running controller action" do
43
+ expect(@controller.send(:long_controller_action_timeout)).to eq(2)
44
+ expect(ExceptionHandling).to receive(:log_error).with(/Long controller action detected in #{@controller.class.name.split("::").last}::test_action/)
45
+ @controller.simulate_around_filter do
46
+ sleep(3)
47
+ end
48
+ end
49
+
50
+ it "not report long running controller actions if it is less than the timeout" do
51
+ expect(@controller.send(:long_controller_action_timeout)).to eq(2)
52
+ allow(ExceptionHandling).to receive(:log_error).and_return("Should not timeout")
53
+ @controller.simulate_around_filter do
54
+ sleep(1)
55
+ end
56
+ end
57
+
58
+ it "default long running controller action(300/30 for test/prod)" do
59
+ class DummyController
60
+ include ExceptionHandling::Methods
61
+ end
62
+
63
+ controller = DummyController.new
64
+
65
+ Rails.env = 'production'
66
+ expect(controller.send(:long_controller_action_timeout)).to eq(30)
67
+
68
+ Rails.env = 'test'
69
+ expect(controller.send(:long_controller_action_timeout)).to eq(300)
70
+ end
71
+
72
+ context "#log_warning" do
73
+ it "be available to the controller" do
74
+ expect(@controller.methods.include?(:log_warning)).to eq(true)
75
+ end
76
+ end
77
+
78
+ context "included deprecation" do
79
+ before do
80
+ mock_deprecation_3_0
81
+ end
82
+
83
+ it "deprecate when no around_filter in included hook" do
84
+ k = Class.new
85
+ k.include ExceptionHandling::Methods
86
+ end
87
+
88
+ it "deprecate controller around_filter in included hook" do
89
+ controller = Class.new
90
+ class << controller
91
+ def around_filter(*)
92
+ end
93
+ end
94
+ controller.include ExceptionHandling::Methods
95
+ end
96
+ end
97
+
98
+ private
99
+
100
+ def mock_deprecation_3_0
101
+ expect(STDERR).to receive(:puts).with(/DEPRECATION WARNING: ExceptionHandling::Methods is deprecated and will be removed from exception_handling 3\.0/)
102
+ end
103
+ end
104
+ end
105
+ end