File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ def parser(options) # rubocop:disable Metrics/MethodLength
106
106
107
107
opts . on ( '-v' , '--version' , 'Show the current version of this gem' ) do
108
108
puts "annotate v#{ Annotate . version } "
109
+ options [ :exit ] = true
109
110
end
110
111
111
112
opts . on ( '-m' , '--show-migration' , 'Include the migration version number in the annotation' ) do
@@ -220,7 +221,8 @@ def parser(options) # rubocop:disable Metrics/MethodLength
220
221
221
222
def default_options
222
223
{
223
- target_action : :do_annotations
224
+ target_action : :do_annotations ,
225
+ exit : false
224
226
}
225
227
end
226
228
end
Original file line number Diff line number Diff line change 208
208
describe option do
209
209
it 'sets the ENV variable' do
210
210
expect { Parser . parse ( [ option ] ) } . to output ( "annotate v#{ Annotate . version } \n " ) . to_stdout
211
+ expect ( Parser . parse ( [ option ] ) ) . to include ( exit : true )
211
212
end
212
213
end
213
214
end
You can’t perform that action at this time.
0 commit comments