byebug 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +13 -11
  4. data/Rakefile +0 -6
  5. data/bin/byebug +83 -136
  6. data/ext/byebug/byebug.c +182 -96
  7. data/ext/byebug/byebug.h +5 -7
  8. data/ext/byebug/context.c +52 -40
  9. data/lib/byebug.rb +81 -81
  10. data/lib/byebug/command.rb +18 -35
  11. data/lib/byebug/commands/control.rb +1 -1
  12. data/lib/byebug/commands/display.rb +0 -2
  13. data/lib/byebug/commands/enable.rb +4 -16
  14. data/lib/byebug/commands/eval.rb +5 -3
  15. data/lib/byebug/commands/frame.rb +68 -69
  16. data/lib/byebug/commands/help.rb +2 -1
  17. data/lib/byebug/commands/info.rb +43 -42
  18. data/lib/byebug/commands/method.rb +4 -3
  19. data/lib/byebug/commands/set.rb +10 -19
  20. data/lib/byebug/commands/show.rb +6 -13
  21. data/lib/byebug/interface.rb +1 -1
  22. data/lib/byebug/processor.rb +14 -17
  23. data/lib/byebug/version.rb +1 -2
  24. data/old_doc/byebug.texi +576 -847
  25. data/test/breakpoints_test.rb +0 -1
  26. data/test/conditions_test.rb +35 -33
  27. data/test/display_test.rb +14 -13
  28. data/test/edit_test.rb +28 -25
  29. data/test/eval_test.rb +0 -2
  30. data/test/finish_test.rb +4 -3
  31. data/test/frame_test.rb +20 -21
  32. data/test/help_test.rb +26 -23
  33. data/test/info_test.rb +105 -108
  34. data/test/irb_test.rb +26 -25
  35. data/test/kill_test.rb +19 -19
  36. data/test/list_test.rb +140 -156
  37. data/test/method_test.rb +21 -22
  38. data/test/post_mortem_test.rb +2 -5
  39. data/test/quit_test.rb +16 -17
  40. data/test/reload_test.rb +2 -2
  41. data/test/restart_test.rb +0 -1
  42. data/test/save_test.rb +31 -32
  43. data/test/set_test.rb +50 -47
  44. data/test/show_test.rb +67 -66
  45. data/test/source_test.rb +31 -34
  46. data/test/stepping_test.rb +32 -34
  47. data/test/support/test_dsl.rb +1 -1
  48. data/test/trace_test.rb +1 -2
  49. data/test/variables_test.rb +36 -34
  50. metadata +2 -4
  51. data/lib/byebug/commands/tmate.rb +0 -36
  52. data/test/tmate_test.rb +0 -44
@@ -1,90 +1,88 @@
1
1
  require_relative 'test_helper'
2
2
 
3
- describe "Info Command" do
3
+ describe 'Info Command' do
4
4
  include TestDsl
5
5
  include Columnize
6
6
 
7
- describe "Args info" do
8
- before { Byebug::InfoCommand.settings[:width] = 15 }
9
-
10
- it "must show info about all args" do
11
- enter 'break 3', 'cont', 'info args'
7
+ describe 'Args info' do
8
+ it 'must show info about all args' do
9
+ enter 'set width 15', 'break 3', 'cont', 'info args'
12
10
  debug_file 'info'
13
11
  check_output_includes 'a = "aaaaaaa...', 'b = "b"'
14
12
  end
15
13
  end
16
14
 
17
- describe "Breakpoints info" do
18
- it "must show info about all breakpoints" do
15
+ describe 'Breakpoints info' do
16
+ it 'must show info about all breakpoints' do
19
17
  enter 'break 7', 'break 9 if a == b', 'info breakpoints'
20
18
  debug_file 'info'
21
- check_output_includes "Num Enb What",
19
+ check_output_includes 'Num Enb What',
22
20
  /\d+ +y at #{fullpath('info')}:7/,
23
21
  /\d+ +y at #{fullpath('info')}:9 if a == b/
24
22
  end
25
23
 
26
- it "must show info about specific breakpoint" do
24
+ it 'must show info about specific breakpoint' do
27
25
  enter 'break 7', 'break 9',
28
- ->{"info breakpoints #{Byebug.breakpoints.first.id}"}
26
+ ->{ "info breakpoints #{Byebug.breakpoints.first.id}" }
29
27
  debug_file 'info'
30
- check_output_includes "Num Enb What", /\d+ +y at #{fullpath('info')}:7/
28
+ check_output_includes 'Num Enb What', /\d+ +y at #{fullpath('info')}:7/
31
29
  check_output_doesnt_include /\d+ +y at #{fullpath('info')}:9/
32
30
  end
33
31
 
34
- it "must show an error if no breakpoints are found" do
32
+ it 'must show an error if no breakpoints are found' do
35
33
  enter 'info breakpoints'
36
34
  debug_file 'info'
37
- check_output_includes "No breakpoints."
35
+ check_output_includes 'No breakpoints.'
38
36
  end
39
37
 
40
- it "must show an error if no breakpoints are found" do
38
+ it 'must show an error if no breakpoints are found' do
41
39
  enter 'break 7', 'info breakpoints 123'
42
40
  debug_file 'info'
43
- check_output_includes "No breakpoints found among list given.",
44
- interface.error_queue
41
+ check_output_includes \
42
+ 'No breakpoints found among list given.', interface.error_queue
45
43
  end
46
44
 
47
- it "must show hit count" do
45
+ it 'must show hit count' do
48
46
  enter 'break 9', 'cont', 'info breakpoints'
49
47
  debug_file 'info'
50
- check_output_includes /\d+ +y at #{fullpath('info')}:9/
51
- check_output_includes /\d+ +y at #{fullpath('info')}:9/,
52
- "breakpoint already hit 1 time"
48
+ check_output_includes \
49
+ /\d+ +y at #{fullpath('info')}:9/, 'breakpoint already hit 1 time'
53
50
  end
54
51
  end
55
52
 
56
- describe "Display info" do
57
- it "must show all display expressions" do
53
+ describe 'Display info' do
54
+ it 'must show all display expressions' do
58
55
  enter 'display 3 + 3', 'display a + b', 'info display'
59
56
  debug_file 'info'
60
- check_output_includes "Auto-display expressions now in effect:",
61
- "Num Enb Expression",
62
- "1: y 3 + 3",
63
- "2: y a + b"
57
+ check_output_includes 'Auto-display expressions now in effect:',
58
+ 'Num Enb Expression',
59
+ '1: y 3 + 3',
60
+ '2: y a + b'
64
61
  end
65
62
 
66
- it "must show a message if there are no display expressions created" do
63
+ it 'must show a message if there are no display expressions created' do
67
64
  enter 'info display'
68
65
  debug_file 'info'
69
- check_output_includes "There are no auto-display expressions now."
66
+ check_output_includes 'There are no auto-display expressions now.'
70
67
  end
71
68
  end
72
69
 
73
- describe "Files info" do
70
+ describe 'Files info' do
74
71
  let(:files) { (LineCache.cached_files + SCRIPT_LINES__.keys).uniq.sort }
75
- it "must show all files read in" do
72
+
73
+ it 'must show all files read in' do
76
74
  enter 'info files'
77
75
  debug_file 'info'
78
76
  check_output_includes files.map { |f| "File #{f}" }
79
77
  end
80
78
 
81
- it "must show all files read in using 'info file' too" do
79
+ it 'must show all files read in using "info file" too' do
82
80
  enter 'info file'
83
81
  debug_file 'info'
84
82
  check_output_includes files.map { |f| "File #{f}" }
85
83
  end
86
84
 
87
- it "must show explicitly loaded files" do
85
+ it 'must show explicitly loaded files' do
88
86
  enter 'info files stat'
89
87
  debug_file 'info'
90
88
  check_output_includes "File #{fullpath('info')}",
@@ -92,199 +90,199 @@ describe "Info Command" do
92
90
  end
93
91
  end
94
92
 
95
- describe "File info" do
93
+ describe 'File info' do
96
94
  let(:file) { fullpath('info') }
97
95
  let(:filename) { "File #{file}" }
98
96
  let(:lines) { "#{LineCache.size(file)} lines" }
99
97
  let(:mtime) { LineCache.stat(file).mtime.to_s }
100
98
  let(:sha1) { LineCache.sha1(file) }
101
- let(:breakpoint_line_numbers) do
99
+ let(:breakpoint_line_numbers) {
102
100
  columnize(LineCache.trace_line_numbers(file).to_a.sort,
103
- Byebug::InfoCommand.settings[:width])
104
- end
101
+ Byebug::InfoCommand.settings[:width]) }
105
102
 
106
- it "must show basic info about the file" do
103
+ it 'must show basic info about the file' do
107
104
  enter "info file #{file} basic"
108
105
  debug_file 'info'
109
106
  check_output_includes filename, lines
110
107
  check_output_doesnt_include breakpoint_line_numbers, mtime, sha1
111
108
  end
112
109
 
113
- it "must show number of lines" do
110
+ it 'must show number of lines' do
114
111
  enter "info file #{file} lines"
115
112
  debug_file 'info'
116
113
  check_output_includes filename, lines
117
114
  check_output_doesnt_include breakpoint_line_numbers, mtime, sha1
118
115
  end
119
116
 
120
- it "must show mtime of the file" do
117
+ it 'must show mtime of the file' do
121
118
  enter "info file #{file} mtime"
122
119
  debug_file 'info'
123
120
  check_output_includes filename, mtime
124
121
  check_output_doesnt_include lines, breakpoint_line_numbers, sha1
125
122
  end
126
123
 
127
- it "must show sha1 of the file" do
124
+ it 'must show sha1 of the file' do
128
125
  enter "info file #{file} sha1"
129
126
  debug_file 'info'
130
127
  check_output_includes filename, sha1
131
128
  check_output_doesnt_include lines, breakpoint_line_numbers, mtime
132
129
  end
133
130
 
134
- it "must show breakpoints in the file" do
131
+ it 'must show breakpoints in the file' do
135
132
  enter 'break 5', 'break 7', "info file #{file} breakpoints"
136
133
  debug_file 'info'
137
134
  check_output_includes /Created breakpoint \d+ at #{file}:5/,
138
135
  /Created breakpoint \d+ at #{file}:7/,
139
136
  filename,
140
- "breakpoint line numbers:", breakpoint_line_numbers
137
+ 'breakpoint line numbers:', breakpoint_line_numbers
141
138
  check_output_doesnt_include lines, mtime, sha1
142
139
  end
143
140
 
144
- it "must show all info about the file" do
141
+ it 'must show all info about the file' do
145
142
  enter "info file #{file} all"
146
143
  debug_file 'info'
147
144
  check_output_includes \
148
145
  filename, lines, breakpoint_line_numbers, mtime, sha1
149
146
  end
150
147
 
151
- it "must not show info about the file if the file is not loaded" do
148
+ it 'must not show info about the file if the file is not loaded' do
152
149
  enter "info file #{fullpath('info2')} basic"
153
150
  debug_file 'info'
154
151
  check_output_includes "File #{fullpath('info2')} is not cached"
155
152
  end
156
153
 
157
- it "must not show any info if the parameter is invalid" do
154
+ it 'must not show any info if the parameter is invalid' do
158
155
  enter "info file #{file} blabla"
159
156
  debug_file 'info'
160
- check_output_includes "Invalid parameter blabla", interface.error_queue
157
+ check_output_includes 'Invalid parameter blabla', interface.error_queue
161
158
  end
162
159
  end
163
160
 
164
- describe "Instance variables info" do
165
- it "must show instance variables" do
161
+ describe 'Instance variables info' do
162
+ it 'must show instance variables' do
166
163
  enter 'break 21', 'cont', 'info instance_variables'
167
164
  debug_file 'info'
168
165
  check_output_includes '@bla = "blabla"', '@foo = "bar"'
169
166
  end
170
167
  end
171
168
 
172
- describe "Line info" do
173
- it "must show the current line" do
169
+ describe 'Line info' do
170
+ it 'must show the current line' do
174
171
  enter 'break 21', 'cont', 'info line'
175
172
  debug_file 'info'
176
173
  check_output_includes "Line 21 of \"#{fullpath('info')}\""
177
174
  end
178
175
  end
179
176
 
180
- describe "Locals info" do
181
-
182
- it "must show the current local variables" do
183
- Byebug::InfoCommand.settings[:width] = 12
184
- enter 'break 21', 'cont', 'info locals'
177
+ describe 'Locals info' do
178
+ it 'must show the current local variables' do
179
+ enter 'set width 12', 'break 21', 'cont', 'info locals'
185
180
  debug_file 'info'
186
181
  check_output_includes 'a = "1111...', 'b = 2'
187
182
  end
188
183
 
189
- it "must fail if the local variable doesn't respond to #to_s or to #inspect" do
190
- Byebug::InfoCommand.settings[:width] = 21
191
- enter 'break 26', 'cont', 'info locals'
184
+ it 'must fail if local variable doesn\'t respond to #to_s or to #inspect' do
185
+ enter 'set width 21', 'break 26', 'cont', 'info locals'
192
186
  debug_file 'info'
193
- check_output_includes "*Error in evaluation*"
187
+ check_output_includes '*Error in evaluation*'
194
188
  end
195
189
  end
196
190
 
197
- describe "Program info" do
198
- it "must show the initial stop reason" do
191
+ describe 'Program info' do
192
+ it 'must show the initial stop reason' do
199
193
  enter 'info program'
200
194
  debug_file 'info'
201
195
  check_output_includes \
202
- "It stopped after stepping, next'ing or initial start."
196
+ 'It stopped after stepping, next\'ing or initial start.'
203
197
  end
204
198
 
205
- it "must show the step stop reason" do
199
+ it 'must show the step stop reason' do
206
200
  enter 'step', 'info program'
207
201
  debug_file 'info'
208
202
  check_output_includes \
209
- "Program stopped.",
210
- "It stopped after stepping, next'ing or initial start."
203
+ 'Program stopped.',
204
+ 'It stopped after stepping, next\'ing or initial start.'
211
205
  end
212
206
 
213
- it "must show the breakpoint stop reason" do
207
+ it 'must show the breakpoint stop reason' do
214
208
  enter 'break 7', 'cont', 'info program'
215
209
  debug_file 'info'
216
- check_output_includes "Program stopped.", "It stopped at a breakpoint."
210
+ check_output_includes 'Program stopped.', 'It stopped at a breakpoint.'
217
211
  end
218
212
 
219
- it "must show the catchpoint stop reason"
213
+ it 'must show the catchpoint stop reason' do
214
+ skip('TODO')
215
+ end
220
216
 
221
- it "must show the unknown stop reason" do
217
+ it 'must show the unknown stop reason' do
222
218
  enter 'break 7', 'cont',
223
- ->{context.stubs(:stop_reason).returns("blabla"); 'info program'}
219
+ ->{ context.stubs(:stop_reason).returns('blabla'); 'info program' }
224
220
  debug_file 'info'
225
- check_output_includes "Program stopped.", "unknown reason: blabla"
221
+ check_output_includes 'Program stopped.', 'unknown reason: blabla'
226
222
  end
227
223
 
228
- it "must show an error if the program is crashed"
224
+ it 'must show an error if the program is crashed' do
225
+ skip('TODO')
226
+ end
229
227
  end
230
228
 
231
- describe "Stack info" do
232
- before { Byebug::InfoCommand.settings[:full_path] = true }
229
+ describe 'Stack info' do
230
+ let(:width) { " #2 <main> at #{fullpath('info')}:36".size }
233
231
 
234
- it "must show stack info" do
235
- enter 'break 20', 'cont', 'info stack'
232
+ it 'must show stack info' do
233
+ enter 'set fullpath', ->{ "set width #{width}"}, 'break 20', 'cont',
234
+ 'info stack'
236
235
  debug_file 'info'
237
- check_output_includes \
238
- "-->", "#0", "A.a", "at #{fullpath('info')}:20",
239
- "#1", "A.b", "at #{fullpath('info')}:30",
240
- "#2", "at #{fullpath('info')}:36"
236
+ check_output_includes "--> #0 A.a at #{fullpath('info')}:20",
237
+ " #1 A.b at #{fullpath('info')}:30",
238
+ " #2 <main> at #{fullpath('info')}:36"
241
239
  end
242
240
  end
243
241
 
244
- describe "Thread info" do
245
- it "must show threads info when without args" do
242
+ describe 'Thread info' do
243
+ it 'must show threads info when without args' do
246
244
  enter 'break 48', 'cont', 'info threads'
247
245
  debug_file 'info_threads'
248
246
  check_output_includes /#<Thread:\S+ run>/
249
247
  end
250
248
 
251
- it "must show thread info" do
252
- skip("XXX: Unreliable due to race conditions, needs fix to be reliable")
249
+ it 'must show thread info' do
250
+ skip('XXX: Unreliable due to race conditions, needs fix to be reliable')
253
251
  thread_number = nil
254
- enter ->{thread_number = context.thnum; "info thread #{context.thnum}"}
252
+ enter ->{ thread_number = context.thnum; "info thread #{context.thnum}" }
255
253
  debug_file 'info'
256
- check_output_includes "+", thread_number.to_s, /#<Thread:\S+ run>/
254
+ check_output_includes '+', thread_number.to_s, /#<Thread:\S+ run>/
257
255
  end
258
256
 
259
- it "must show verbose thread info" do
260
- skip("XXX: Unreliable due to race conditions, needs fix to be reliable")
261
- enter 'break 20', 'cont', ->{"info thread #{context.thnum} verbose"}
257
+ it 'must show verbose thread info' do
258
+ skip('XXX: Unreliable due to race conditions, needs fix to be reliable')
259
+ enter 'break 20', 'cont', ->{ "info thread #{context.thnum} verbose" }
262
260
  debug_file 'info'
263
- check_output_includes /#<Thread:\S+ run>/, "#0", "A.a",
264
- "at #{fullpath('info')}:20"
261
+ check_output_includes \
262
+ /#<Thread:\S+ run>/, '#0', 'A.a', "at #{fullpath('info')}:20"
265
263
  end
266
264
 
267
- it "must show error when unknown parameter is used" do
268
- skip("No thread support")
269
- enter ->{"info thread #{context.thnum} blabla"}
265
+ it 'must show error when unknown parameter is used' do
266
+ skip('No thread support')
267
+ enter ->{'info thread #{context.thnum} blabla'}
270
268
  debug_file 'info'
271
- check_output_includes "'terse' or 'verbose' expected. Got 'blabla'",
272
- interface.error_queue
269
+ check_output_includes \
270
+ '"terse" or "verbose" expected. Got "blabla"', interface.error_queue
273
271
  end
274
272
  end
275
273
 
276
- describe "Global Variables info" do
277
- it "must show global variables" do
274
+ describe 'Global Variables info' do
275
+ it 'must show global variables' do
278
276
  enter 'info global_variables'
279
277
  debug_file 'info'
280
278
  check_output_includes "$$ = #{Process.pid}"
281
279
  end
282
280
  end
283
281
 
284
- describe "Variables info" do
285
- before { Byebug::InfoCommand.settings[:width] = 30 }
282
+ describe 'Variables info' do
283
+ before { Byebug::Command.settings[:width] = 30 }
286
284
 
287
- it "must show all variables" do
285
+ it 'must show all variables' do
288
286
  enter 'break 21', 'cont', 'info variables'
289
287
  debug_file 'info'
290
288
  check_output_includes 'a = "1111111111111111111111...',
@@ -294,7 +292,7 @@ describe "Info Command" do
294
292
  '@foo = "bar"'
295
293
  end
296
294
 
297
- it "must fail if the variable doesn't respond to #to_s or to #inspect" do
295
+ it 'must fail if the variable doesn\'t respond to #to_s or to #inspect' do
298
296
  enter 'break 26', 'cont', 'info variables'
299
297
  debug_file 'info'
300
298
  check_output_includes 'a = *Error in evaluation*',
@@ -303,18 +301,17 @@ describe "Info Command" do
303
301
  '@foo = "bar"'
304
302
  end
305
303
 
306
- it "must handle printf strings correctly" do
304
+ it 'must handle printf strings correctly' do
307
305
  enter 'break 32', 'cont', 'info variables'
308
306
  debug_file 'info'
309
307
  check_output_includes 'e = "%%.2f"'
310
308
  end
311
309
  end
312
310
 
313
- describe "Post Mortem" do
314
- it "must work in post-mortem mode" do
315
- skip("No post morten mode for now")
311
+ describe 'Post Mortem' do
312
+ it 'must work in post-mortem mode' do
316
313
  enter 'cont', 'info line'
317
- debug_file "post_mortem"
314
+ debug_file 'post_mortem'
318
315
  check_output_includes "Line 8 of \"#{fullpath('post_mortem')}\""
319
316
  end
320
317
  end
@@ -1,62 +1,64 @@
1
1
  require_relative 'test_helper'
2
2
 
3
- describe "Irb Command" do
3
+ describe 'Irb Command' do
4
4
  include TestDsl
5
5
 
6
6
  def after_setup
7
7
  interface.stubs(:kind_of?).with(Byebug::LocalInterface).returns(true)
8
8
  IRB::Irb.stubs(:new).returns(irb)
9
- Signal.trap("SIGINT", "IGNORE")
9
+ Signal.trap('SIGINT', 'IGNORE')
10
10
  end
11
11
 
12
12
  def after_teardown
13
- Signal.trap("SIGINT", "DEFAULT")
13
+ Signal.trap('SIGINT', 'DEFAULT')
14
14
  end
15
15
 
16
16
  let(:irb) { stub(context: ->{}) }
17
17
 
18
- it "must support next command" do
18
+ it 'must support next command' do
19
19
  irb.stubs(:eval_input).throws(:IRB_EXIT, :next)
20
20
  enter 'irb'
21
21
  debug_file('irb') { state.line.must_equal 3 }
22
22
  end
23
23
 
24
- it "must support step command" do
24
+ it 'must support step command' do
25
25
  irb.stubs(:eval_input).throws(:IRB_EXIT, :step)
26
26
  enter 'irb'
27
27
  debug_file('irb') { state.line.must_equal 3 }
28
28
  end
29
29
 
30
- it "must support cont command" do
30
+ it 'must support cont command' do
31
31
  irb.stubs(:eval_input).throws(:IRB_EXIT, :cont)
32
32
  enter 'break 4', 'irb'
33
33
  debug_file('irb') { state.line.must_equal 4 }
34
34
  end
35
35
 
36
- #describe "autoirb" do
37
- # it "must call irb automatically after breakpoint" do
38
- # irb.expects(:eval_input)
39
- # enter 'set autoirb', 'break 4', 'cont'
40
- # debug_file 'irb'
41
- # end
42
- #end
36
+ describe 'autoirb' do
37
+ it 'must call irb automatically after breakpoint' do
38
+ skip('Segfaulting... skip until fixed')
39
+ irb.expects(:eval_input)
40
+ enter 'set autoirb', 'break 4', 'cont'
41
+ debug_file 'irb'
42
+ end
43
+ end
43
44
 
44
- # TODO: Can't reliably test the signal, from time to time Signal.trap, which
45
- # is defined in IRBCommand, misses the SIGINT signal, which makes the test
46
- # suite exit. Not sure how to fix that...
47
- it "must translate SIGINT into 'cont' command" do
48
- irb.stubs(:eval_input).calls { Process.kill("SIGINT", Process.pid) }
45
+ it 'must translate SIGINT into "cont" command' do
46
+ skip 'TODO: Can\'t reliably test the signal, from time to time ' \
47
+ 'Signal.trap, which is defined in IRBCommand, misses the SIGINT ' \
48
+ 'signal, which makes the test suite exit. Not sure how to fix ' \
49
+ 'that...'
50
+ irb.stubs(:eval_input).calls { Process.kill('SIGINT', Process.pid) }
49
51
  enter 'break 4', 'irb'
50
52
  debug_file('irb') { state.line.must_equal 4 }
51
53
  end
52
54
 
53
- describe "setting context to $byebug_state" do
55
+ describe 'setting context to $byebug_state' do
54
56
  before do
55
57
  $byebug_state = nil
56
58
  Byebug::Command.settings[:byebugtesting] = false
57
59
  end
58
60
 
59
- it "must set $byebug_state if irb is in the debug mode" do
61
+ it 'must set $byebug_state if irb is in the debug mode' do
60
62
  byebug_state = nil
61
63
  irb.stubs(:eval_input).calls { byebug_state = $byebug_state }
62
64
  enter 'irb -d'
@@ -64,7 +66,7 @@ describe "Irb Command" do
64
66
  byebug_state.must_be_kind_of Byebug::CommandProcessor::State
65
67
  end
66
68
 
67
- it "must not set $byebug_state if irb is not in the debug mode" do
69
+ it 'must not set $byebug_state if irb is not in the debug mode' do
68
70
  byebug_state = nil
69
71
  irb.stubs(:eval_input).calls { byebug_state = $byebug_state }
70
72
  enter 'irb'
@@ -73,12 +75,11 @@ describe "Irb Command" do
73
75
  end
74
76
  end
75
77
 
76
- describe "Post Mortem" do
77
- it "must work in post-mortem mode" do
78
- skip("No post morten mode for now")
78
+ describe 'Post Mortem' do
79
+ it 'must work in post-mortem mode' do
79
80
  irb.stubs(:eval_input).throws(:IRB_EXIT, :cont)
80
81
  enter 'cont', 'break 12', 'irb'
81
- debug_file("post_mortem") { state.line.must_equal 12 }
82
+ debug_file('post_mortem') { state.line.must_equal 12 }
82
83
  end
83
84
  end
84
85