byebug 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +1 -1
  4. data/bin/byebug +1 -2
  5. data/byebug.gemspec +1 -1
  6. data/ext/byebug/byebug.c +50 -35
  7. data/ext/byebug/context.c +99 -45
  8. data/lib/byebug.rb +5 -10
  9. data/lib/byebug/command.rb +20 -12
  10. data/lib/byebug/commands/breakpoints.rb +1 -1
  11. data/lib/byebug/commands/control.rb +14 -21
  12. data/lib/byebug/commands/display.rb +4 -4
  13. data/lib/byebug/commands/enable.rb +20 -19
  14. data/lib/byebug/commands/eval.rb +1 -1
  15. data/lib/byebug/commands/finish.rb +4 -5
  16. data/lib/byebug/commands/info.rb +118 -116
  17. data/lib/byebug/commands/list.rb +72 -48
  18. data/lib/byebug/commands/reload.rb +4 -3
  19. data/lib/byebug/commands/set.rb +7 -16
  20. data/lib/byebug/commands/show.rb +2 -2
  21. data/lib/byebug/commands/threads.rb +7 -6
  22. data/lib/byebug/context.rb +10 -2
  23. data/lib/byebug/helper.rb +3 -3
  24. data/lib/byebug/processor.rb +1 -1
  25. data/lib/byebug/version.rb +1 -1
  26. data/old_doc/byebug.texi +45 -51
  27. data/test/breakpoints_test.rb +180 -195
  28. data/test/display_test.rb +59 -53
  29. data/test/eval_test.rb +0 -2
  30. data/test/examples/info.rb +5 -5
  31. data/test/examples/info_threads.rb +1 -1
  32. data/test/finish_test.rb +16 -15
  33. data/test/info_test.rb +9 -10
  34. data/test/irb_test.rb +64 -65
  35. data/test/list_test.rb +76 -50
  36. data/test/method_test.rb +10 -5
  37. data/test/post_mortem_test.rb +27 -25
  38. data/test/reload_test.rb +31 -31
  39. data/test/restart_test.rb +106 -110
  40. data/test/show_test.rb +8 -16
  41. data/test/stepping_test.rb +4 -2
  42. data/test/support/test_dsl.rb +37 -76
  43. data/test/test_helper.rb +0 -1
  44. data/test/variables_test.rb +9 -12
  45. metadata +4 -4
@@ -1,24 +1,24 @@
1
1
  require_relative 'test_helper'
2
2
 
3
- describe "Breakpoints" do
3
+ describe 'Breakpoints' do
4
4
  include TestDsl
5
5
 
6
- describe "setting breakpoint in the current file" do
6
+ describe 'setting breakpoint in the current file' do
7
7
  before { enter 'break 10' }
8
8
  subject { Byebug.breakpoints.first }
9
9
 
10
10
  def check_subject(field, value)
11
- debug_file("breakpoint1") { subject.send(field).must_equal value }
11
+ debug_file('breakpoint1') { subject.send(field).must_equal value }
12
12
  end
13
13
 
14
- it("must have correct pos") { check_subject(:pos, 10) }
15
- it("must have correct source") {
16
- check_subject(:source, fullpath("breakpoint1")) }
17
- it("must have correct expression") { check_subject(:expr, nil) }
18
- it("must have correct hit count") { check_subject(:hit_count, 0) }
19
- it("must have correct hit value") { check_subject(:hit_value, 0) }
20
- it("must be enabled") { check_subject(:enabled?, true) }
21
- it("must return right response") do
14
+ it('must have correct pos') { check_subject(:pos, 10) }
15
+ it('must have correct source') {
16
+ check_subject(:source, fullpath('breakpoint1')) }
17
+ it('must have correct expression') { check_subject(:expr, nil) }
18
+ it('must have correct hit count') { check_subject(:hit_count, 0) }
19
+ it('must have correct hit value') { check_subject(:hit_value, 0) }
20
+ it('must be enabled') { check_subject(:enabled?, true) }
21
+ it('must return right response') do
22
22
  id = nil
23
23
  debug_file('breakpoint1') { id = subject.id }
24
24
  check_output_includes \
@@ -26,22 +26,22 @@ describe "Breakpoints" do
26
26
  end
27
27
  end
28
28
 
29
- describe "using shortcut for the command" do
29
+ describe 'using shortcut for the command' do
30
30
  before { enter 'b 10' }
31
- it "must set a breakpoint" do
32
- debug_file("breakpoint1") { Byebug.breakpoints.size.must_equal 1 }
31
+ it 'must set a breakpoint' do
32
+ debug_file('breakpoint1') { Byebug.breakpoints.size.must_equal 1 }
33
33
  end
34
34
  end
35
35
 
36
- describe "setting breakpoint to unexistent line" do
36
+ describe 'setting breakpoint to unexistent line' do
37
37
  before { enter 'break 100' }
38
38
 
39
- it "must not create a breakpoint" do
40
- debug_file("breakpoint1") { Byebug.breakpoints.must_be_empty }
39
+ it 'must not create a breakpoint' do
40
+ debug_file('breakpoint1') { Byebug.breakpoints.must_be_empty }
41
41
  end
42
42
 
43
- it "must show an error" do
44
- debug_file("breakpoint1")
43
+ it 'must show an error' do
44
+ debug_file('breakpoint1')
45
45
  check_output_includes \
46
46
  "There are only #{LineCache.size(fullpath('breakpoint1'))} lines in" \
47
47
  " file #{fullpath('breakpoint1')}", interface.error_queue
@@ -49,74 +49,64 @@ describe "Breakpoints" do
49
49
  end
50
50
 
51
51
 
52
- describe "setting breakpoint to incorrect line" do
52
+ describe 'setting breakpoint to incorrect line' do
53
53
  before { enter 'break 11' }
54
54
 
55
- it "must not create a breakpoint" do
56
- debug_file("breakpoint1") { Byebug.breakpoints.must_be_empty }
55
+ it 'must not create a breakpoint' do
56
+ debug_file('breakpoint1') { Byebug.breakpoints.must_be_empty }
57
57
  end
58
58
 
59
- it "must show an error" do
60
- debug_file("breakpoint1")
59
+ it 'must show an error' do
60
+ debug_file('breakpoint1')
61
61
  check_output_includes \
62
62
  "Line 11 is not a stopping point in file #{fullpath('breakpoint1')}",
63
63
  interface.error_queue
64
64
  end
65
65
  end
66
66
 
67
- describe "stopping at breakpoint" do
68
- it "must stop at the correct line" do
67
+ describe 'stopping at breakpoint' do
68
+ it 'must stop at the correct line' do
69
69
  enter 'break 14', 'cont'
70
- debug_file("breakpoint1") { state.line.must_equal 14 }
70
+ debug_file('breakpoint1') { state.line.must_equal 14 }
71
71
  end
72
72
 
73
- it "must stop at the correct file" do
73
+ it 'must stop at the correct file' do
74
74
  enter 'break 14', 'cont'
75
- debug_file("breakpoint1") {
76
- state.file.must_equal fullpath("breakpoint1") }
75
+ debug_file('breakpoint1') {
76
+ state.file.must_equal fullpath('breakpoint1') }
77
77
  end
78
78
 
79
- describe "show a message" do
80
- before do
81
- @old_hashes = {}
82
- set_tmp_hash(Byebug::Command.settings, :basename, false)
83
- @id = nil
84
- end
85
-
86
- after do
87
- restore_tmp_hash(Byebug::Command.settings, :basename)
88
- end
89
-
90
- it "must show a message with full filename" do
79
+ describe 'show a message' do
80
+ it 'must show a message with full filename' do
91
81
  enter 'break 14', 'cont'
92
- debug_file("breakpoint1") { @id = Byebug.breakpoints.first.id }
82
+ debug_file('breakpoint1') { @id = Byebug.breakpoints.first.id }
93
83
  check_output_includes \
94
84
  "Created breakpoint #{@id} at #{fullpath('breakpoint1')}:14"
95
85
  end
96
86
 
97
- it "must show a message with basename" do
87
+ it 'must show a message with basename' do
98
88
  enter 'set basename', 'break 14', 'cont'
99
- debug_file("breakpoint1") { @id = Byebug.breakpoints.first.id }
89
+ debug_file('breakpoint1') { @id = Byebug.breakpoints.first.id }
100
90
  check_output_includes "Created breakpoint #{@id} at breakpoint1.rb:14"
101
91
  end
102
92
  end
103
93
  end
104
94
 
105
- describe "reloading source on change" do
106
- it "must not reload source if autoreload is not set" do
95
+ describe 'reloading source on change' do
96
+ it 'must not reload source if autoreload is not set' do
107
97
  id = nil
108
98
  enter \
109
99
  'set noautoreload',
110
100
  ->{change_line_in_file(fullpath('breakpoint1'), 14, ''); 'break 14'},
111
101
  ->{change_line_in_file(fullpath('breakpoint1'), 14, 'c = a + b');
112
102
  'cont'}
113
- debug_file("breakpoint1") { id = Byebug.breakpoints.first.id }
103
+ debug_file('breakpoint1') { id = Byebug.breakpoints.first.id }
114
104
  check_output_includes \
115
105
  "Created breakpoint #{id} at #{fullpath('breakpoint1')}:14"
116
106
  end
117
107
 
118
- it "must reload source if autoreload is set" do
119
- enter(
108
+ it 'must reload source if autoreload is set' do
109
+ enter \
120
110
  'set autoreload',
121
111
  ->{change_line_in_file(fullpath('breakpoint1'), 14, ''); 'break 14'},
122
112
  # Setting second breakpoint just to reload the source code after rolling
@@ -124,269 +114,264 @@ describe "Breakpoints" do
124
114
  ->{change_line_in_file(fullpath('breakpoint1'), 14, 'c = a + b');
125
115
  'break 15'},
126
116
  'cont'
127
- )
128
- debug_file "breakpoint1"
117
+ debug_file 'breakpoint1'
129
118
  check_output_includes \
130
119
  "Line 14 is not a stopping point in file #{fullpath('breakpoint1')}",
131
120
  interface.error_queue
132
121
  end
133
122
  end
134
123
 
135
- describe "set breakpoint in a file" do
136
- describe "successfully" do
137
- before do
138
- enter "break #{fullpath('breakpoint2')}:3", 'cont'
139
- end
124
+ describe 'set breakpoint in a file' do
125
+ describe 'successfully' do
126
+ before { enter "break #{fullpath('breakpoint2')}:3", 'cont' }
140
127
 
141
- it "must stop at the correct line" do
142
- debug_file("breakpoint1") { state.line.must_equal 3 }
128
+ it 'must stop at the correct line' do
129
+ debug_file('breakpoint1') { state.line.must_equal 3 }
143
130
  end
144
131
 
145
- it "must stop at the correct file" do
146
- debug_file("breakpoint1") {
147
- state.file.must_equal fullpath("breakpoint2") }
132
+ it 'must stop at the correct file' do
133
+ debug_file('breakpoint1') {
134
+ state.file.must_equal fullpath('breakpoint2') }
148
135
  end
149
136
  end
150
137
 
151
- describe "when setting breakpoint to unexisted file" do
138
+ describe 'when setting breakpoint to unexisted file' do
152
139
  before do
153
- enter "break asf:324"
154
- debug_file("breakpoint1")
140
+ enter 'break asf:324'
141
+ debug_file('breakpoint1')
155
142
  end
156
- it "must show an error" do
157
- check_output_includes "No source file named asf", interface.error_queue
143
+ it 'must show an error' do
144
+ check_output_includes 'No source file named asf', interface.error_queue
158
145
  end
159
146
 
160
- it "must ask about setting breakpoint anyway" do
147
+ it 'must ask about setting breakpoint anyway' do
161
148
  check_output_includes \
162
- "Set breakpoint anyway? (y/n)", interface.confirm_queue
149
+ 'Set breakpoint anyway? (y/n)', interface.confirm_queue
163
150
  end
164
151
  end
165
152
  end
166
153
 
167
- describe "set breakpoint to a method" do
168
- describe "set breakpoint to an instance method" do
169
- before do
170
- enter 'break A#b', 'cont'
171
- end
154
+ describe 'set breakpoint to a method' do
155
+ describe 'set breakpoint to an instance method' do
156
+ before { enter 'break A#b', 'cont' }
172
157
 
173
- it "must stop at the correct line" do
174
- debug_file("breakpoint1") { state.line.must_equal 5 }
158
+ it 'must stop at the correct line' do
159
+ debug_file('breakpoint1') { state.line.must_equal 5 }
175
160
  end
176
161
 
177
- it "must stop at the correct file" do
178
- debug_file("breakpoint1") {
179
- state.file.must_equal fullpath("breakpoint1") }
162
+ it 'must stop at the correct file' do
163
+ debug_file('breakpoint1') {
164
+ state.file.must_equal fullpath('breakpoint1') }
180
165
  end
181
166
  end
182
167
 
183
- describe "set breakpoint to a class method" do
184
- before do
185
- enter 'break A.a', 'cont'
186
- end
168
+ describe 'set breakpoint to a class method' do
169
+ before { enter 'break A.a', 'cont' }
187
170
 
188
- it "must stop at the correct line" do
189
- debug_file("breakpoint1") { state.line.must_equal 2 }
171
+ it 'must stop at the correct line' do
172
+ debug_file('breakpoint1') { state.line.must_equal 2 }
190
173
  end
191
174
 
192
- it "must stop at the correct file" do
193
- debug_file("breakpoint1") {
194
- state.file.must_equal fullpath("breakpoint1") }
175
+ it 'must stop at the correct file' do
176
+ debug_file('breakpoint1') {
177
+ state.file.must_equal fullpath('breakpoint1') }
195
178
  end
196
179
  end
197
180
 
198
- describe "set breakpoint to unexisted class" do
199
- it "must show an error" do
200
- enter "break B.a"
201
- debug_file("breakpoint1")
202
- check_output_includes "Unknown class B.", interface.error_queue
181
+ describe 'set breakpoint to unexisted class' do
182
+ it 'must show an error' do
183
+ enter 'break B.a'
184
+ debug_file('breakpoint1')
185
+ check_output_includes 'Unknown class B.', interface.error_queue
203
186
  end
204
187
  end
205
188
  end
206
189
 
207
- describe "set breakpoint to an invalid location" do
208
- before { enter "break foo" }
190
+ describe 'set breakpoint to an invalid location' do
191
+ before { enter 'break foo' }
209
192
 
210
- it "must not create a breakpoint" do
211
- debug_file("breakpoint1") { Byebug.breakpoints.must_be_empty }
193
+ it 'must not create a breakpoint' do
194
+ debug_file('breakpoint1') { Byebug.breakpoints.must_be_empty }
212
195
  end
213
196
 
214
- it "must show an error" do
215
- debug_file("breakpoint1")
197
+ it 'must show an error' do
198
+ debug_file('breakpoint1')
216
199
  check_output_includes \
217
200
  'Invalid breakpoint location: foo.', interface.error_queue
218
201
  end
219
202
  end
220
203
 
221
- describe "disabling a breakpoint" do
222
- describe "successfully" do
223
- before { enter "break 14" }
204
+ describe 'disabling a breakpoint' do
205
+ describe 'successfully' do
206
+ before { enter 'break 14' }
207
+
208
+ describe 'short syntax' do
209
+ before { enter ->{"disable #{Byebug.breakpoints.first.id}"},
210
+ 'break 15' }
224
211
 
225
- describe "short syntax" do
226
- before { enter ->{"disable #{Byebug.breakpoints.first.id}"}, "break 15" }
227
- it "must have a breakpoint with #enabled? returning false" do
228
- debug_file("breakpoint1") {
212
+ it 'must have a breakpoint with #enabled? returning false' do
213
+ debug_file('breakpoint1') {
229
214
  Byebug.breakpoints.first.enabled?.must_equal false }
230
215
  end
231
216
 
232
- it "must not stop on the disabled breakpoint" do
233
- enter "cont"
234
- debug_file("breakpoint1") { state.line.must_equal 15 }
217
+ it 'must not stop on the disabled breakpoint' do
218
+ enter 'cont'
219
+ debug_file('breakpoint1') { state.line.must_equal 15 }
235
220
  end
236
221
  end
237
222
 
238
- describe "full syntax" do
223
+ describe 'full syntax' do
239
224
  before { enter ->{"disable breakpoints #{Byebug.breakpoints.first.id}"},
240
- "break 15" }
241
- it "must have a breakpoint with #enabled? returning false" do
242
- debug_file("breakpoint1") {
225
+ 'break 15' }
226
+
227
+ it 'must have a breakpoint with #enabled? returning false' do
228
+ debug_file('breakpoint1') {
243
229
  Byebug.breakpoints.first.enabled?.must_equal false }
244
230
  end
245
231
  end
246
232
  end
247
233
 
248
- describe "errors" do
249
- it "must show an error if syntax is incorrect" do
250
- enter "disable"
251
- debug_file("breakpoint1")
234
+ describe 'errors' do
235
+ it 'must show an error if syntax is incorrect' do
236
+ enter 'disable'
237
+ debug_file('breakpoint1')
252
238
  check_output_includes \
253
- '"disable" must be followed "display", "breakpoints" or breakpoint ' \
254
- 'numbers.', interface.error_queue
239
+ '"disable" must be followed by "display", "breakpoints" or ' \
240
+ 'breakpoint numbers.', interface.error_queue
255
241
 
256
242
  end
257
243
 
258
- it "must show an error if no breakpoints is set" do
259
- enter "disable 1"
260
- debug_file("breakpoint1")
244
+ it 'must show an error if no breakpoints is set' do
245
+ enter 'disable 1'
246
+ debug_file('breakpoint1')
261
247
  check_output_includes \
262
248
  'No breakpoints have been set.', interface.error_queue
263
249
  end
264
250
 
265
- it "must show an error if not a number is provided as an argument to " \
266
- " 'disable' command" do
267
- enter "break 14", "disable foo"
268
- debug_file("breakpoint1")
251
+ it 'must show an error if not a number is provided as an argument to ' \
252
+ ' "disable" command' do
253
+ enter 'break 14', 'disable foo'
254
+ debug_file('breakpoint1')
269
255
  check_output_includes \
270
- "Disable breakpoints argument 'foo' needs to be a number."
256
+ 'Disable breakpoints argument "foo" needs to be a number.'
271
257
  end
272
258
  end
273
259
  end
274
260
 
275
- describe "enabling a breakpoint" do
261
+ describe 'enabling a breakpoint' do
276
262
 
277
- describe "successfully" do
278
- before { enter "break 14" }
263
+ describe 'successfully' do
264
+ before { enter 'break 14' }
279
265
 
280
- describe "short syntax" do
281
- before { enter ->{"enable #{Byebug.breakpoints.first.id}"}, "break 15" }
266
+ describe 'short syntax' do
267
+ before { enter ->{"enable #{Byebug.breakpoints.first.id}"}, 'break 15' }
282
268
 
283
- it "must have a breakpoint with #enabled? returning true" do
284
- debug_file("breakpoint1") {
269
+ it 'must have a breakpoint with #enabled? returning true' do
270
+ debug_file('breakpoint1') {
285
271
  Byebug.breakpoints.first.enabled?.must_equal true }
286
272
  end
287
273
 
288
- it "must stop on the enabled breakpoint" do
289
- enter "cont"
290
- debug_file("breakpoint1") { state.line.must_equal 14 }
274
+ it 'must stop on the enabled breakpoint' do
275
+ enter 'cont'
276
+ debug_file('breakpoint1') { state.line.must_equal 14 }
291
277
  end
292
278
  end
293
279
 
294
- describe "full syntax" do
280
+ describe 'full syntax' do
295
281
  before { enter ->{"enable breakpoints #{Byebug.breakpoints.first.id}"},
296
- "break 15" }
282
+ 'break 15' }
297
283
 
298
- it "must have a breakpoint with #enabled? returning true" do
299
- debug_file("breakpoint1") {
284
+ it 'must have a breakpoint with #enabled? returning true' do
285
+ debug_file('breakpoint1') {
300
286
  Byebug.breakpoints.first.enabled?.must_equal true }
301
287
  end
302
288
  end
303
289
  end
304
290
 
305
- describe "errors" do
306
- it "must show an error if syntax is incorrect" do
307
- enter "enable"
308
- debug_file("breakpoint1")
309
- check_output_includes '"enable" must be followed "display", ' \
310
- '"breakpoints" or breakpoint numbers.', interface.error_queue
291
+ describe 'errors' do
292
+ it 'must show an error if syntax is incorrect' do
293
+ enter 'enable'
294
+ debug_file('breakpoint1')
295
+ check_output_includes \
296
+ '"enable" must be followed by "display", "breakpoints" or ' \
297
+ 'breakpoint numbers.', interface.error_queue
311
298
  end
312
299
  end
313
300
  end
314
301
 
315
- describe "deleting a breakpoint" do
316
- before { enter "break 14", ->{"delete #{Byebug.breakpoints.first.id}"},
317
- "break 15" }
302
+ describe 'deleting a breakpoint' do
303
+ before { enter 'break 14', ->{"delete #{Byebug.breakpoints.first.id}"},
304
+ 'break 15' }
318
305
 
319
- it "must have only one breakpoint" do
320
- debug_file("breakpoint1") { Byebug.breakpoints.size.must_equal 1 }
306
+ it 'must have only one breakpoint' do
307
+ debug_file('breakpoint1') { Byebug.breakpoints.size.must_equal 1 }
321
308
  end
322
309
 
323
- it "must not stop on the disabled breakpoint" do
324
- enter "cont"
325
- debug_file("breakpoint1") { state.line.must_equal 15 }
310
+ it 'must not stop on the disabled breakpoint' do
311
+ enter 'cont'
312
+ debug_file('breakpoint1') { state.line.must_equal 15 }
326
313
  end
327
314
  end
328
315
 
329
- describe "Conditional breakpoints" do
330
- it "must stop if the condition is true" do
331
- enter "break 14 if b == 5", "break 15", "cont"
332
- debug_file("breakpoint1") { state.line.must_equal 14 }
316
+ describe 'Conditional breakpoints' do
317
+ it 'must stop if the condition is true' do
318
+ enter 'break 14 if b == 5', 'break 15', 'cont'
319
+ debug_file('breakpoint1') { state.line.must_equal 14 }
333
320
  end
334
321
 
335
- it "must skip if the condition is false" do
336
- enter "break 14 if b == 3", "break 15", "cont"
337
- debug_file("breakpoint1") { state.line.must_equal 15 }
322
+ it 'must skip if the condition is false' do
323
+ enter 'break 14 if b == 3', 'break 15', 'cont'
324
+ debug_file('breakpoint1') { state.line.must_equal 15 }
338
325
  end
339
326
 
340
- it "must show an error when conditional syntax is wrong" do
341
- enter "break 14 ifa b == 3", "break 15", "cont"
342
- debug_file("breakpoint1") { state.line.must_equal 15 }
327
+ it 'must show an error when conditional syntax is wrong' do
328
+ enter 'break 14 ifa b == 3', 'break 15', 'cont'
329
+ debug_file('breakpoint1') { state.line.must_equal 15 }
343
330
  check_output_includes \
344
- "Expecting 'if' in breakpoint condition; got: ifa b == 3.",
331
+ 'Expecting "if" in breakpoint condition; got: ifa b == 3.',
345
332
  interface.error_queue
346
333
  end
347
334
 
348
- describe "enabling with wrong conditional syntax" do
349
- before do
350
- enter(
351
- "break 14",
352
- ->{"disable #{Byebug.breakpoints.first.id}"},
353
- ->{"cond #{Byebug.breakpoints.first.id} b -=( 3"},
354
- ->{"enable #{Byebug.breakpoints.first.id}"}
355
- )
356
- end
335
+ describe 'enabling with wrong conditional syntax' do
336
+ before { enter 'break 14',
337
+ ->{"disable #{Byebug.breakpoints.first.id}"},
338
+ ->{"cond #{Byebug.breakpoints.first.id} b -=( 3"},
339
+ ->{"enable #{Byebug.breakpoints.first.id}"} }
357
340
 
358
- it "must not enable a breakpoint" do
359
- debug_file("breakpoint1") {
341
+ it 'must not enable a breakpoint' do
342
+ debug_file('breakpoint1') {
360
343
  Byebug.breakpoints.first.enabled?.must_equal false }
361
344
  end
362
345
 
363
- it "must show an error" do
364
- debug_file("breakpoint1")
365
- check_output_includes 'Expression "b -=( 3" syntactically incorrect; ' \
366
- 'breakpoint remains disabled.', interface.error_queue
346
+ it 'must show an error' do
347
+ debug_file('breakpoint1')
348
+ check_output_includes \
349
+ 'Expression "b -=( 3" syntactically incorrect; breakpoint remains ' \
350
+ 'disabled.', interface.error_queue
367
351
  end
368
352
  end
369
353
 
370
- it "must show an error if no file or line is specified" do
371
- enter "break ifa b == 3", "break 15", "cont"
372
- debug_file("breakpoint1") { state.line.must_equal 15 }
354
+ it 'must show an error if no file or line is specified' do
355
+ enter 'break ifa b == 3', 'break 15', 'cont'
356
+ debug_file('breakpoint1') { state.line.must_equal 15 }
373
357
  check_output_includes \
374
- "Invalid breakpoint location: ifa b == 3.", interface.error_queue
358
+ 'Invalid breakpoint location: ifa b == 3.', interface.error_queue
375
359
  end
376
360
 
377
- it "must show an error if expression syntax is invalid" do
378
- enter "break if b -=) 3", "break 15", "cont"
379
- debug_file("breakpoint1") { state.line.must_equal 15 }
380
- check_output_includes 'Expression "b -=) 3" syntactically incorrect; ' \
381
- 'breakpoint disabled.', interface.error_queue
361
+ it 'must show an error if expression syntax is invalid' do
362
+ enter 'break if b -=) 3', 'break 15', 'cont'
363
+ debug_file('breakpoint1') { state.line.must_equal 15 }
364
+ check_output_includes \
365
+ 'Expression "b -=) 3" syntactically incorrect; breakpoint disabled.',
366
+ interface.error_queue
382
367
  end
383
368
  end
384
369
 
385
- describe "Post Mortem" do
386
- it "must be able to set breakpoints in post-mortem mode" do
387
- skip("No post morten mode for now")
388
- #enter 'cont', 'break 12', 'cont'
389
- #debug_file("post_mortem") { state.line.must_equal 12 }
370
+ describe 'Post Mortem' do
371
+ it 'must be able to set breakpoints in post-mortem mode' do
372
+ skip('No post morten mode for now')
373
+ enter 'cont', 'break 12', 'cont'
374
+ debug_file('post_mortem') { state.line.must_equal 12 }
390
375
  end
391
376
  end
392
377