File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,25 @@ module Annotate # rubocop:disable Metrics/ModuleLength
48
48
expect ( ENV ) . to have_received ( :[]= ) . with ( file_type , position )
49
49
end
50
50
end
51
-
52
- context 'the ENV value for different file type has already been set' do
53
- end
54
51
end
55
52
end
56
53
end
57
54
end
58
55
56
+ context 'when position_in_class is set to top' do
57
+ context 'and when position is a different value' do
58
+ it 'does not override' do
59
+ other_commands = %w[ --pc top ]
60
+ position_command = %w[ -p bottom ]
61
+ options = other_commands + position_command
62
+
63
+ Parser . parse ( options )
64
+ expect ( ENV [ 'position_in_class' ] ) . to eq ( 'top' )
65
+ expect ( ENV [ 'position' ] ) . to eq ( 'bottom' )
66
+ end
67
+ end
68
+ end
69
+
59
70
%w[ --pc --position-in-class ] . each do |option |
60
71
describe option do
61
72
let ( :env_key ) { 'position_in_class' }
You can’t perform that action at this time.
0 commit comments