File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 - 2.5.0
77script :
88 - bundle exec rspec
9- - bundle exec rspec spec/lib/instrumentation/as_notifications.rb
Original file line number Diff line number Diff line change 11require 'spec_helper'
2- require 'fast_jsonapi/instrumentation'
32
43describe FastJsonapi ::ObjectSerializer do
54 include_context 'movie class'
65
76 context 'instrument' do
87
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+
922 before ( :each ) do
1023 options = { }
1124 options [ :meta ] = { total : 2 }
You can’t perform that action at this time.
0 commit comments