File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 6
6
- 2.5.0
7
7
script :
8
8
- bundle exec rspec
9
- - bundle exec rspec spec/lib/instrumentation/as_notifications.rb
Original file line number Diff line number Diff line change 1
1
require 'spec_helper'
2
- require 'fast_jsonapi/instrumentation'
3
2
4
3
describe FastJsonapi ::ObjectSerializer do
5
4
include_context 'movie class'
6
5
7
6
context 'instrument' do
8
7
8
+ before ( :all ) do
9
+ require 'fast_jsonapi/instrumentation'
10
+ end
11
+
12
+ after ( :all ) do
13
+ [ :serialized_json , :serializable_hash ] . each do |m |
14
+ alias_command = "alias_method :#{ m } , :#{ m } _without_instrumentation"
15
+ FastJsonapi ::ObjectSerializer . class_eval ( alias_command )
16
+
17
+ remove_command = "remove_method :#{ m } _without_instrumentation"
18
+ FastJsonapi ::ObjectSerializer . class_eval ( remove_command )
19
+ end
20
+ end
21
+
9
22
before ( :each ) do
10
23
options = { }
11
24
options [ :meta ] = { total : 2 }
You can’t perform that action at this time.
0 commit comments