File tree 4 files changed +10
-2
lines changed
4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
PATH
2
2
remote: .
3
3
specs:
4
- code_ownership (1.33.0 )
4
+ code_ownership (1.33.1 )
5
5
code_teams (~> 1.0 )
6
6
packs
7
7
sorbet-runtime (>= 0.5.10821 )
Original file line number Diff line number Diff line change 1
1
Gem ::Specification . new do |spec |
2
2
spec . name = 'code_ownership'
3
- spec . version = '1.33.0 '
3
+ spec . version = '1.33.1 '
4
4
spec . authors = [ 'Gusto Engineers' ]
5
5
spec . email = [ '[email protected] ' ]
6
6
spec . summary = 'A gem to help engineering teams declare ownership of code'
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ def self.path_from_klass(klass)
70
70
else
71
71
nil
72
72
end
73
+ rescue NameError
74
+ nil
73
75
end
74
76
75
77
#
Original file line number Diff line number Diff line change 210
210
expect ( CodeOwnership ) . to_not have_received ( :for_file )
211
211
expect ( Object ) . to_not have_received ( :const_source_location )
212
212
end
213
+
214
+ it 'returns nil if the class constant cannot be found' do
215
+ allow ( CodeOwnership ) . to receive ( :for_file )
216
+ allow ( Object ) . to receive ( :const_source_location ) . and_raise ( NameError )
217
+ expect ( CodeOwnership . for_class ( MyFile ) ) . to eq nil
218
+ end
213
219
end
214
220
215
221
describe '.for_team' do
You can’t perform that action at this time.
0 commit comments