transpec 2.2.5 → 2.3.0

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 (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/lib/transpec/conversion_error.rb +5 -5
  4. data/lib/transpec/converter.rb +14 -12
  5. data/lib/transpec/record.rb +88 -31
  6. data/lib/transpec/report.rb +19 -11
  7. data/lib/transpec/rspec_version.rb +9 -0
  8. data/lib/transpec/syntax/be_boolean.rb +2 -2
  9. data/lib/transpec/syntax/be_close.rb +1 -1
  10. data/lib/transpec/syntax/current_example.rb +35 -17
  11. data/lib/transpec/syntax/double.rb +1 -1
  12. data/lib/transpec/syntax/example.rb +0 -4
  13. data/lib/transpec/syntax/example_group.rb +11 -11
  14. data/lib/transpec/syntax/have/{have_record.rb → record_builder.rb} +15 -17
  15. data/lib/transpec/syntax/have.rb +2 -2
  16. data/lib/transpec/syntax/hook.rb +3 -3
  17. data/lib/transpec/syntax/its.rb +25 -17
  18. data/lib/transpec/syntax/matcher_definition.rb +1 -2
  19. data/lib/transpec/syntax/method_stub.rb +44 -51
  20. data/lib/transpec/syntax/mixin/any_instance_block.rb +8 -6
  21. data/lib/transpec/syntax/mixin/useless_and_return.rb +9 -7
  22. data/lib/transpec/syntax/oneliner_should.rb +29 -27
  23. data/lib/transpec/syntax/operator.rb +3 -3
  24. data/lib/transpec/syntax/pending.rb +0 -4
  25. data/lib/transpec/syntax/raise_error.rb +35 -15
  26. data/lib/transpec/syntax/receive.rb +6 -6
  27. data/lib/transpec/syntax/rspec_configure/config_modification.rb +39 -5
  28. data/lib/transpec/syntax/rspec_configure/framework.rb +27 -7
  29. data/lib/transpec/syntax/rspec_configure/mocks.rb +2 -2
  30. data/lib/transpec/syntax/rspec_configure.rb +35 -4
  31. data/lib/transpec/syntax/should.rb +35 -20
  32. data/lib/transpec/syntax/should_receive.rb +30 -27
  33. data/lib/transpec/syntax.rb +10 -0
  34. data/lib/transpec/version.rb +2 -2
  35. data/spec/integration/configuration_modification_spec.rb +43 -3
  36. data/spec/transpec/record_spec.rb +113 -18
  37. data/spec/transpec/report_spec.rb +15 -6
  38. data/spec/transpec/rspec_version_spec.rb +5 -0
  39. data/spec/transpec/syntax/be_boolean_spec.rb +10 -10
  40. data/spec/transpec/syntax/be_close_spec.rb +2 -2
  41. data/spec/transpec/syntax/current_example_spec.rb +6 -6
  42. data/spec/transpec/syntax/double_spec.rb +2 -2
  43. data/spec/transpec/syntax/example_group_spec.rb +4 -4
  44. data/spec/transpec/syntax/example_spec.rb +8 -8
  45. data/spec/transpec/syntax/have_spec.rb +44 -44
  46. data/spec/transpec/syntax/hook_spec.rb +8 -8
  47. data/spec/transpec/syntax/its_spec.rb +16 -16
  48. data/spec/transpec/syntax/matcher_definition_spec.rb +2 -2
  49. data/spec/transpec/syntax/method_stub_spec.rb +36 -36
  50. data/spec/transpec/syntax/oneliner_should_spec.rb +26 -26
  51. data/spec/transpec/syntax/operator_spec.rb +18 -18
  52. data/spec/transpec/syntax/pending_spec.rb +6 -6
  53. data/spec/transpec/syntax/raise_error_spec.rb +10 -10
  54. data/spec/transpec/syntax/receive_spec.rb +20 -20
  55. data/spec/transpec/syntax/rspec_configure_spec.rb +202 -18
  56. data/spec/transpec/syntax/should_receive_spec.rb +30 -30
  57. data/spec/transpec/syntax/should_spec.rb +8 -8
  58. data/tasks/fixtures/mail/2.99.0/COMMIT_EDITMSG +1 -1
  59. data/tasks/fixtures/mail/3.0.0/COMMIT_EDITMSG +5 -2
  60. data/tasks/fixtures/twitter/2.99.0/COMMIT_EDITMSG +1 -1
  61. data/tasks/fixtures/twitter/3.0.0/COMMIT_EDITMSG +2 -2
  62. metadata +2 -2
@@ -210,8 +210,8 @@ module Transpec
210
210
  end
211
211
 
212
212
  it 'adds record `obj.stub(:message)` -> `allow(obj).to receive(:message)`' do
213
- record.original_syntax.should == 'obj.stub(:message)'
214
- record.converted_syntax.should == 'allow(obj).to receive(:message)'
213
+ record.old_syntax.should == 'obj.stub(:message)'
214
+ record.new_syntax.should == 'allow(obj).to receive(:message)'
215
215
  end
216
216
 
217
217
  context 'with runtime information' do
@@ -317,8 +317,8 @@ module Transpec
317
317
  end
318
318
 
319
319
  it 'adds record `obj.stub!(:message)` -> `allow(obj).to receive(:message)`' do
320
- record.original_syntax.should == 'obj.stub!(:message)'
321
- record.converted_syntax.should == 'allow(obj).to receive(:message)'
320
+ record.old_syntax.should == 'obj.stub!(:message)'
321
+ record.new_syntax.should == 'allow(obj).to receive(:message)'
322
322
  end
323
323
  end
324
324
 
@@ -445,8 +445,8 @@ module Transpec
445
445
 
446
446
  it 'adds record ' \
447
447
  '`obj.stub(:message => value)` -> `allow(obj).to receive_messages(:message => value)`' do
448
- record.original_syntax.should == 'obj.stub(:message => value)'
449
- record.converted_syntax.should == 'allow(obj).to receive_messages(:message => value)'
448
+ record.old_syntax.should == 'obj.stub(:message => value)'
449
+ record.new_syntax.should == 'allow(obj).to receive_messages(:message => value)'
450
450
  end
451
451
  end
452
452
 
@@ -477,8 +477,8 @@ module Transpec
477
477
 
478
478
  it 'adds record ' \
479
479
  '`obj.stub(:message => value)` -> `allow(obj).to receive(:message).and_return(value)`' do
480
- record.original_syntax.should == 'obj.stub(:message => value)'
481
- record.converted_syntax.should == 'allow(obj).to receive(:message).and_return(value)'
480
+ record.old_syntax.should == 'obj.stub(:message => value)'
481
+ record.new_syntax.should == 'allow(obj).to receive(:message).and_return(value)'
482
482
  end
483
483
  end
484
484
  end
@@ -510,8 +510,8 @@ module Transpec
510
510
 
511
511
  it 'adds record ' \
512
512
  '`obj.stub(:message => value)` -> `allow(obj).to receive(:message).and_return(value)`' do
513
- record.original_syntax.should == 'obj.stub(:message => value)'
514
- record.converted_syntax.should == 'allow(obj).to receive(:message).and_return(value)'
513
+ record.old_syntax.should == 'obj.stub(:message => value)'
514
+ record.new_syntax.should == 'allow(obj).to receive(:message).and_return(value)'
515
515
  end
516
516
  end
517
517
 
@@ -544,8 +544,8 @@ module Transpec
544
544
 
545
545
  it 'adds record ' \
546
546
  '`obj.stub(:message => value)` -> `allow(obj).to receive(:message).and_return(value)`' do
547
- record.original_syntax.should == 'obj.stub(:message => value)'
548
- record.converted_syntax.should == 'allow(obj).to receive(:message).and_return(value)'
547
+ record.old_syntax.should == 'obj.stub(:message => value)'
548
+ record.new_syntax.should == 'allow(obj).to receive(:message).and_return(value)'
549
549
  end
550
550
 
551
551
  context 'when the statement continues over multi lines' do
@@ -660,8 +660,8 @@ module Transpec
660
660
 
661
661
  it "adds record `obj.stub_chain(:message1, :message2)` -> ' +
662
662
  '`allow(obj).to receive_message_chain(:message1, :message2)`" do
663
- record.original_syntax.should == 'obj.stub_chain(:message1, :message2)'
664
- record.converted_syntax.should == 'allow(obj).to receive_message_chain(:message1, :message2)'
663
+ record.old_syntax.should == 'obj.stub_chain(:message1, :message2)'
664
+ record.new_syntax.should == 'allow(obj).to receive_message_chain(:message1, :message2)'
665
665
  end
666
666
  end
667
667
 
@@ -699,8 +699,8 @@ module Transpec
699
699
  end
700
700
 
701
701
  it "adds record `obj.#{method}(:message)` -> `allow(obj).to receive(:message).and_call_original`" do
702
- record.original_syntax.should == "obj.#{method}(:message)"
703
- record.converted_syntax.should == 'allow(obj).to receive(:message).and_call_original'
702
+ record.old_syntax.should == "obj.#{method}(:message)"
703
+ record.new_syntax.should == 'allow(obj).to receive(:message).and_call_original'
704
704
  end
705
705
  end
706
706
  end
@@ -758,8 +758,8 @@ module Transpec
758
758
 
759
759
  it 'adds record `Klass.any_instance.stub(:message)` ' \
760
760
  '-> `allow_any_instance_of(obj).to receive(:message)`' do
761
- record.original_syntax.should == 'Klass.any_instance.stub(:message)'
762
- record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
761
+ record.old_syntax.should == 'Klass.any_instance.stub(:message)'
762
+ record.new_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
763
763
  end
764
764
 
765
765
  context 'when the statement continues over multi lines' do
@@ -829,8 +829,8 @@ module Transpec
829
829
 
830
830
  it 'adds record `Klass.any_instance.stub(:message)` ' \
831
831
  '-> `allow_any_instance_of(obj).to receive(:message)`' do
832
- record.original_syntax.should == 'Klass.any_instance.stub(:message)'
833
- record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
832
+ record.old_syntax.should == 'Klass.any_instance.stub(:message)'
833
+ record.new_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
834
834
  end
835
835
  end
836
836
 
@@ -867,8 +867,8 @@ module Transpec
867
867
 
868
868
  it 'adds record `Klass.any_instance.stub(:message)` ' \
869
869
  '-> `allow_any_instance_of(obj).to receive(:message)`' do
870
- record.original_syntax.should == 'Klass.any_instance.stub(:message)'
871
- record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
870
+ record.old_syntax.should == 'Klass.any_instance.stub(:message)'
871
+ record.new_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
872
872
  end
873
873
  end
874
874
  end
@@ -901,8 +901,8 @@ module Transpec
901
901
 
902
902
  it "adds record `Klass.any_instance.#{method}(:message)` " \
903
903
  '-> `allow_any_instance_of(Klass).to receive(:message).and_call_original`' do
904
- record.original_syntax.should == "Klass.any_instance.#{method}(:message)"
905
- record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message).and_call_original'
904
+ record.old_syntax.should == "Klass.any_instance.#{method}(:message)"
905
+ record.new_syntax.should == 'allow_any_instance_of(Klass).to receive(:message).and_call_original'
906
906
  end
907
907
  end
908
908
  end
@@ -944,8 +944,8 @@ module Transpec
944
944
 
945
945
  it 'adds record ' \
946
946
  "`obj.#{method}(:message)` -> `obj.#{replacement_method}(:message)`" do
947
- record.original_syntax.should == "obj.#{method}(:message)"
948
- record.converted_syntax.should == "obj.#{replacement_method}(:message)"
947
+ record.old_syntax.should == "obj.#{method}(:message)"
948
+ record.new_syntax.should == "obj.#{replacement_method}(:message)"
949
949
  end
950
950
  end
951
951
  end
@@ -1068,8 +1068,8 @@ module Transpec
1068
1068
 
1069
1069
  it 'adds record ' \
1070
1070
  '`obj.stub(:message).any_number_of_times` -> `obj.stub(:message)`' do
1071
- record.original_syntax.should == 'obj.stub(:message).any_number_of_times'
1072
- record.converted_syntax.should == 'obj.stub(:message)'
1071
+ record.old_syntax.should == 'obj.stub(:message).any_number_of_times'
1072
+ record.new_syntax.should == 'obj.stub(:message)'
1073
1073
  end
1074
1074
  end
1075
1075
 
@@ -1100,8 +1100,8 @@ module Transpec
1100
1100
 
1101
1101
  it 'adds record ' \
1102
1102
  '`obj.stub(:message).at_least(0)` -> `obj.stub(:message)`' do
1103
- record.original_syntax.should == 'obj.stub(:message).at_least(0)'
1104
- record.converted_syntax.should == 'obj.stub(:message)'
1103
+ record.old_syntax.should == 'obj.stub(:message).at_least(0)'
1104
+ record.new_syntax.should == 'obj.stub(:message)'
1105
1105
  end
1106
1106
  end
1107
1107
 
@@ -1153,8 +1153,8 @@ module Transpec
1153
1153
  end
1154
1154
 
1155
1155
  it 'adds record `obj.stub(:message).and_return { value }` -> `obj.stub(:message) { value }`' do
1156
- record.original_syntax.should == 'obj.stub(:message).and_return { value }'
1157
- record.converted_syntax.should == 'obj.stub(:message) { value }'
1156
+ record.old_syntax.should == 'obj.stub(:message).and_return { value }'
1157
+ record.new_syntax.should == 'obj.stub(:message) { value }'
1158
1158
  end
1159
1159
  end
1160
1160
 
@@ -1240,8 +1240,8 @@ module Transpec
1240
1240
  end
1241
1241
 
1242
1242
  it 'adds record `obj.stub(:message).and_return` -> `obj.stub(:message)`' do
1243
- record.original_syntax.should == 'obj.stub(:message).and_return'
1244
- record.converted_syntax.should == 'obj.stub(:message)'
1243
+ record.old_syntax.should == 'obj.stub(:message).and_return'
1244
+ record.new_syntax.should == 'obj.stub(:message)'
1245
1245
  end
1246
1246
  end
1247
1247
 
@@ -1297,8 +1297,8 @@ module Transpec
1297
1297
 
1298
1298
  it 'adds record `Klass.any_instance.stub(:message) { |arg| }` ' \
1299
1299
  '-> `Klass.any_instance.stub(:message) { |instance, arg| }`' do
1300
- record.original_syntax.should == 'Klass.any_instance.stub(:message) { |arg| }'
1301
- record.converted_syntax.should == 'Klass.any_instance.stub(:message) { |instance, arg| }'
1300
+ record.old_syntax.should == 'Klass.any_instance.stub(:message) { |arg| }'
1301
+ record.new_syntax.should == 'Klass.any_instance.stub(:message) { |instance, arg| }'
1302
1302
  end
1303
1303
  end
1304
1304
  end
@@ -166,8 +166,8 @@ module Transpec
166
166
 
167
167
  it 'adds record `it { should ... }` -> `it { is_expected.to ... }`' do
168
168
  should_object.expectize!
169
- record.original_syntax.should == 'it { should ... }'
170
- record.converted_syntax.should == 'it { is_expected.to ... }'
169
+ record.old_syntax.should == 'it { should ... }'
170
+ record.new_syntax.should == 'it { is_expected.to ... }'
171
171
  end
172
172
  end
173
173
 
@@ -226,8 +226,8 @@ module Transpec
226
226
 
227
227
  it 'adds record ' \
228
228
  '`it { should have(n).items }` -> `it \'has n items\' do subject.size.should == n end`' do
229
- record.original_syntax.should == 'it { should have(n).items }'
230
- record.converted_syntax.should == "it 'has n items' do subject.size.should == n end"
229
+ record.old_syntax.should == 'it { should have(n).items }'
230
+ record.new_syntax.should == "it 'has n items' do subject.size.should == n end"
231
231
  end
232
232
  end
233
233
 
@@ -256,8 +256,8 @@ module Transpec
256
256
 
257
257
  it 'adds record `it { should_not have(n).items }`' \
258
258
  ' -> `it \'does not have n items\' do subject.size.should_not == n end`' do
259
- record.original_syntax.should == 'it { should_not have(n).items }'
260
- record.converted_syntax.should == "it 'does not have n items' do subject.size.should_not == n end"
259
+ record.old_syntax.should == 'it { should_not have(n).items }'
260
+ record.new_syntax.should == "it 'does not have n items' do subject.size.should_not == n end"
261
261
  end
262
262
  end
263
263
 
@@ -286,8 +286,8 @@ module Transpec
286
286
 
287
287
  it 'adds record ' \
288
288
  '`it { should have(n).items }` -> `it \'has n items\' do subject.size.should == n end`' do
289
- record.original_syntax.should == 'it { should have(n).items }'
290
- record.converted_syntax.should == "it 'has n items' do subject.size.should == n end"
289
+ record.old_syntax.should == 'it { should have(n).items }'
290
+ record.new_syntax.should == "it 'has n items' do subject.size.should == n end"
291
291
  end
292
292
  end
293
293
 
@@ -316,8 +316,8 @@ module Transpec
316
316
 
317
317
  it 'adds record ' \
318
318
  '`it { should have(n).items }` -> `it \'has n items\' do subject.size.should == n end`' do
319
- record.original_syntax.should == 'it { should have(n).items }'
320
- record.converted_syntax.should == "it 'has n items' do subject.size.should == n end"
319
+ record.old_syntax.should == 'it { should have(n).items }'
320
+ record.new_syntax.should == "it 'has n items' do subject.size.should == n end"
321
321
  end
322
322
  end
323
323
 
@@ -346,8 +346,8 @@ module Transpec
346
346
 
347
347
  it 'adds record ' \
348
348
  '`it { should have(n).items }` -> `it \'has n items\' do subject.size.should == n end`' do
349
- record.original_syntax.should == 'it { should have(n).items }'
350
- record.converted_syntax.should == "it 'has n items' do subject.size.should == n end"
349
+ record.old_syntax.should == 'it { should have(n).items }'
350
+ record.new_syntax.should == "it 'has n items' do subject.size.should == n end"
351
351
  end
352
352
  end
353
353
 
@@ -376,8 +376,8 @@ module Transpec
376
376
 
377
377
  it 'adds record `it { should_not have(n).items }`' \
378
378
  ' -> `it \'does not have n items\' do subject.size.should_not == n end`' do
379
- record.original_syntax.should == 'it { should_not have(n).items }'
380
- record.converted_syntax.should == "it 'does not have n items' do subject.size.should_not == n end"
379
+ record.old_syntax.should == 'it { should_not have(n).items }'
380
+ record.new_syntax.should == "it 'does not have n items' do subject.size.should_not == n end"
381
381
  end
382
382
  end
383
383
 
@@ -408,8 +408,8 @@ module Transpec
408
408
 
409
409
  it 'adds record ' \
410
410
  '`it { should have(n).items }` -> `it \'has n items\' do subject.size.should == n end`' do
411
- record.original_syntax.should == 'it { should have(n).items }'
412
- record.converted_syntax.should == "it 'has n items' do subject.size.should == n end"
411
+ record.old_syntax.should == 'it { should have(n).items }'
412
+ record.new_syntax.should == "it 'has n items' do subject.size.should == n end"
413
413
  end
414
414
  end
415
415
 
@@ -440,8 +440,8 @@ module Transpec
440
440
 
441
441
  it 'adds record ' \
442
442
  '`it \'...\' { should have(n).items }` -> `it \'...\' do subject.size.should == n end`' do
443
- record.original_syntax.should == "it '...' do should have(n).items end"
444
- record.converted_syntax.should == "it '...' do subject.size.should == n end"
443
+ record.old_syntax.should == "it '...' do should have(n).items end"
444
+ record.new_syntax.should == "it '...' do subject.size.should == n end"
445
445
  end
446
446
  end
447
447
 
@@ -470,8 +470,8 @@ module Transpec
470
470
 
471
471
  it 'adds record `it { should have_at_least(n).items }` ' \
472
472
  '-> `it \'has at least n items\' do subject.size.should >= n end`' do
473
- record.original_syntax.should == 'it { should have_at_least(n).items }'
474
- record.converted_syntax.should == "it 'has at least n items' do subject.size.should >= n end"
473
+ record.old_syntax.should == 'it { should have_at_least(n).items }'
474
+ record.new_syntax.should == "it 'has at least n items' do subject.size.should >= n end"
475
475
  end
476
476
  end
477
477
 
@@ -516,8 +516,8 @@ module Transpec
516
516
 
517
517
  it 'adds record `it { should have(n).words }` ' \
518
518
  '-> `it \'has n words\' do subject.words.size.should == n end`' do
519
- record.original_syntax.should == 'it { should have(n).words }'
520
- record.converted_syntax.should == "it 'has n words' do subject.words.size.should == n end"
519
+ record.old_syntax.should == 'it { should have(n).words }'
520
+ record.new_syntax.should == "it 'has n words' do subject.words.size.should == n end"
521
521
  end
522
522
  end
523
523
  end
@@ -555,8 +555,8 @@ module Transpec
555
555
 
556
556
  it 'adds record ' \
557
557
  '`it { should have(n).items }` -> `it \'has n items\' do expect(subject.size).to eq(n) end`' do
558
- record.original_syntax.should == 'it { should have(n).items }'
559
- record.converted_syntax.should == "it 'has n items' do expect(subject.size).to eq(n) end"
558
+ record.old_syntax.should == 'it { should have(n).items }'
559
+ record.new_syntax.should == "it 'has n items' do expect(subject.size).to eq(n) end"
560
560
  end
561
561
  end
562
562
 
@@ -585,8 +585,8 @@ module Transpec
585
585
 
586
586
  it 'adds record `it { should_not have(n).items }`' \
587
587
  ' -> `it \'does not have n items\' do expect(subject.size).not_to eq(n) end`' do
588
- record.original_syntax.should == 'it { should_not have(n).items }'
589
- record.converted_syntax.should == "it 'does not have n items' do expect(subject.size).not_to eq(n) end"
588
+ record.old_syntax.should == 'it { should_not have(n).items }'
589
+ record.new_syntax.should == "it 'does not have n items' do expect(subject.size).not_to eq(n) end"
590
590
  end
591
591
  end
592
592
  end
@@ -63,8 +63,8 @@ module Transpec
63
63
  end
64
64
 
65
65
  it 'adds record `== expected` -> `eq(expected)`' do
66
- record.original_syntax.should == '== expected'
67
- record.converted_syntax.should == 'eq(expected)'
66
+ record.old_syntax.should == '== expected'
67
+ record.new_syntax.should == 'eq(expected)'
68
68
  record.annotation.should be_nil
69
69
  end
70
70
 
@@ -184,8 +184,8 @@ module Transpec
184
184
  end
185
185
 
186
186
  it 'adds record `== expected` -> `eq(expected)`' do
187
- record.original_syntax.should == '== expected'
188
- record.converted_syntax.should == 'eq(expected)'
187
+ record.old_syntax.should == '== expected'
188
+ record.new_syntax.should == 'eq(expected)'
189
189
  record.annotation.should be_nil
190
190
  end
191
191
  end
@@ -335,8 +335,8 @@ module Transpec
335
335
  end
336
336
 
337
337
  it "adds record `#{operator} expected` -> `be #{operator} expected`" do
338
- record.original_syntax.should == "#{operator} expected"
339
- record.converted_syntax.should == "be #{operator} expected"
338
+ record.old_syntax.should == "#{operator} expected"
339
+ record.new_syntax.should == "be #{operator} expected"
340
340
  record.annotation.should be_nil
341
341
  end
342
342
  end
@@ -388,8 +388,8 @@ module Transpec
388
388
  end
389
389
 
390
390
  it 'adds record `=~ /pattern/` -> `match(/pattern/)` without annotation' do
391
- record.original_syntax.should == '=~ /pattern/'
392
- record.converted_syntax.should == 'match(/pattern/)'
391
+ record.old_syntax.should == '=~ /pattern/'
392
+ record.new_syntax.should == 'match(/pattern/)'
393
393
  record.annotation.should be_nil
394
394
  end
395
395
  end
@@ -472,8 +472,8 @@ module Transpec
472
472
  end
473
473
 
474
474
  it 'adds record `=~ [1, 2]` -> `match_array([1, 2])` without annotation' do
475
- record.original_syntax.should == '=~ [1, 2]'
476
- record.converted_syntax.should == 'match_array([1, 2])'
475
+ record.old_syntax.should == '=~ [1, 2]'
476
+ record.new_syntax.should == 'match_array([1, 2])'
477
477
  record.annotation.should be_nil
478
478
  end
479
479
  end
@@ -561,8 +561,8 @@ module Transpec
561
561
  end
562
562
 
563
563
  it 'adds record `=~ [1, 2]` -> `match_array([1, 2])` without annotation' do
564
- record.original_syntax.should == '=~ [1, 2]'
565
- record.converted_syntax.should == 'match_array([1, 2])'
564
+ record.old_syntax.should == '=~ [1, 2]'
565
+ record.new_syntax.should == 'match_array([1, 2])'
566
566
  record.annotation.should be_nil
567
567
  end
568
568
  end
@@ -597,8 +597,8 @@ module Transpec
597
597
  end
598
598
 
599
599
  it 'adds record `=~ /pattern/` -> `match(/pattern/)` without annotation' do
600
- record.original_syntax.should == '=~ /pattern/'
601
- record.converted_syntax.should == 'match(/pattern/)'
600
+ record.old_syntax.should == '=~ /pattern/'
601
+ record.new_syntax.should == 'match(/pattern/)'
602
602
  record.annotation.should be_nil
603
603
  end
604
604
  end
@@ -629,8 +629,8 @@ module Transpec
629
629
  end
630
630
 
631
631
  it 'adds record `=~ /pattern/` -> `match(/pattern/)` with annotation' do
632
- record.original_syntax.should == '=~ /pattern/'
633
- record.converted_syntax.should == 'match(/pattern/)'
632
+ record.old_syntax.should == '=~ /pattern/'
633
+ record.new_syntax.should == 'match(/pattern/)'
634
634
 
635
635
  record.annotation.message.should ==
636
636
  'The `=~ variable` has been converted but it might possibly be incorrect ' \
@@ -667,8 +667,8 @@ module Transpec
667
667
  end
668
668
 
669
669
  it 'adds record `=~ /pattern/` -> `match(/pattern/)` with annotation' do
670
- record.original_syntax.should == '=~ /pattern/'
671
- record.converted_syntax.should == 'match(/pattern/)'
670
+ record.old_syntax.should == '=~ /pattern/'
671
+ record.new_syntax.should == 'match(/pattern/)'
672
672
 
673
673
  record.annotation.message.should ==
674
674
  'The `be =~ variable` has been converted but it might possibly be incorrect ' \
@@ -100,8 +100,8 @@ module Transpec
100
100
  end
101
101
 
102
102
  it 'adds record `pending` -> `skip`' do
103
- record.original_syntax.should == 'pending'
104
- record.converted_syntax.should == 'skip'
103
+ record.old_syntax.should == 'pending'
104
+ record.new_syntax.should == 'skip'
105
105
  end
106
106
  end
107
107
 
@@ -131,8 +131,8 @@ module Transpec
131
131
  end
132
132
 
133
133
  it 'adds record `pending` -> `skip`' do
134
- record.original_syntax.should == 'pending'
135
- record.converted_syntax.should == 'skip'
134
+ record.old_syntax.should == 'pending'
135
+ record.new_syntax.should == 'skip'
136
136
  end
137
137
  end
138
138
 
@@ -163,8 +163,8 @@ module Transpec
163
163
  end
164
164
 
165
165
  it 'adds record `pending { do_something_fail }` -> `pending; do_something_fail`' do
166
- record.original_syntax.should == 'pending { do_something_fail }'
167
- record.converted_syntax.should == 'pending; do_something_fail'
166
+ record.old_syntax.should == 'pending { do_something_fail }'
167
+ record.new_syntax.should == 'pending; do_something_fail'
168
168
  end
169
169
  end
170
170
 
@@ -180,8 +180,8 @@ module Transpec
180
180
 
181
181
  it 'adds record ' \
182
182
  '`expect { }.not_to raise_error(SpecificErrorClass)` -> `expect { }.not_to raise_error`' do
183
- record.original_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
184
- record.converted_syntax.should == 'expect { }.not_to raise_error'
183
+ record.old_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
184
+ record.new_syntax.should == 'expect { }.not_to raise_error'
185
185
  end
186
186
  end
187
187
 
@@ -242,8 +242,8 @@ module Transpec
242
242
 
243
243
  it 'adds record ' \
244
244
  '`expect { }.not_to raise_error(SpecificErrorClass)` -> `expect { }.not_to raise_error`' do
245
- record.original_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
246
- record.converted_syntax.should == 'expect { }.not_to raise_error'
245
+ record.old_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
246
+ record.new_syntax.should == 'expect { }.not_to raise_error'
247
247
  end
248
248
  end
249
249
 
@@ -276,8 +276,8 @@ module Transpec
276
276
 
277
277
  it 'adds record ' \
278
278
  '`expect { }.not_to raise_error(SpecificErrorClass)` -> `expect { }.not_to raise_error`' do
279
- record.original_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
280
- record.converted_syntax.should == 'expect { }.not_to raise_error'
279
+ record.old_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
280
+ record.new_syntax.should == 'expect { }.not_to raise_error'
281
281
  end
282
282
  end
283
283
 
@@ -310,8 +310,8 @@ module Transpec
310
310
 
311
311
  it 'adds record ' \
312
312
  '`expect { }.not_to raise_error(SpecificErrorClass, message)` -> `expect { }.not_to raise_error`' do
313
- record.original_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass, message)'
314
- record.converted_syntax.should == 'expect { }.not_to raise_error'
313
+ record.old_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass, message)'
314
+ record.new_syntax.should == 'expect { }.not_to raise_error'
315
315
  end
316
316
  end
317
317
 
@@ -344,8 +344,8 @@ module Transpec
344
344
 
345
345
  it 'adds record ' \
346
346
  '`expect { }.not_to raise_error(message)` -> `expect { }.not_to raise_error`' do
347
- record.original_syntax.should == 'expect { }.not_to raise_error(message)'
348
- record.converted_syntax.should == 'expect { }.not_to raise_error'
347
+ record.old_syntax.should == 'expect { }.not_to raise_error(message)'
348
+ record.new_syntax.should == 'expect { }.not_to raise_error'
349
349
  end
350
350
  end
351
351
  end
@@ -49,8 +49,8 @@ module Transpec
49
49
 
50
50
  it 'adds record `expect(obj).to receive(:message).and_return { value }` ' \
51
51
  '-> `expect(obj).to receive(:message) { value }`' do
52
- record.original_syntax.should == 'expect(obj).to receive(:message).and_return { value }'
53
- record.converted_syntax.should == 'expect(obj).to receive(:message) { value }'
52
+ record.old_syntax.should == 'expect(obj).to receive(:message).and_return { value }'
53
+ record.new_syntax.should == 'expect(obj).to receive(:message) { value }'
54
54
  end
55
55
  end
56
56
 
@@ -85,8 +85,8 @@ module Transpec
85
85
 
86
86
  it 'adds record `expect(obj).to receive(:message).and_return` ' \
87
87
  '-> `expect(obj).to receive(:message)`' do
88
- record.original_syntax.should == 'expect(obj).to receive(:message).and_return'
89
- record.converted_syntax.should == 'expect(obj).to receive(:message)'
88
+ record.old_syntax.should == 'expect(obj).to receive(:message).and_return'
89
+ record.new_syntax.should == 'expect(obj).to receive(:message)'
90
90
  end
91
91
  end
92
92
 
@@ -117,8 +117,8 @@ module Transpec
117
117
 
118
118
  it 'adds record `expect(obj).to receive(:message).and_return` ' \
119
119
  '-> `expect(obj).to receive(:message)`' do
120
- record.original_syntax.should == 'expect(obj).to receive(:message).and_return { value }'
121
- record.converted_syntax.should == 'expect(obj).to receive(:message) { value }'
120
+ record.old_syntax.should == 'expect(obj).to receive(:message).and_return { value }'
121
+ record.new_syntax.should == 'expect(obj).to receive(:message) { value }'
122
122
  end
123
123
  end
124
124
 
@@ -148,8 +148,8 @@ module Transpec
148
148
  end
149
149
 
150
150
  it 'adds record `expect(obj).to receive(:message).and_return` -> `expect(obj).to receive(:message)`' do
151
- record.original_syntax.should == 'expect(obj).to receive(:message).and_return'
152
- record.converted_syntax.should == 'expect(obj).to receive(:message)'
151
+ record.old_syntax.should == 'expect(obj).to receive(:message).and_return'
152
+ record.new_syntax.should == 'expect(obj).to receive(:message)'
153
153
  end
154
154
  end
155
155
 
@@ -201,8 +201,8 @@ module Transpec
201
201
 
202
202
  it 'adds record `allow(obj).to receive(:message).and_return { value }` ' \
203
203
  '-> `allow(obj).to receive(:message) { value }`' do
204
- record.original_syntax.should == 'allow(obj).to receive(:message).and_return { value }'
205
- record.converted_syntax.should == 'allow(obj).to receive(:message) { value }'
204
+ record.old_syntax.should == 'allow(obj).to receive(:message).and_return { value }'
205
+ record.new_syntax.should == 'allow(obj).to receive(:message) { value }'
206
206
  end
207
207
  end
208
208
  end
@@ -245,8 +245,8 @@ module Transpec
245
245
 
246
246
  it 'adds record `expect_any_instance_of(Klass).to receive(:message) { |arg| }` ' \
247
247
  '-> `Klass.any_instance.should_receive(:message) { |instance, arg| }`' do
248
- record.original_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |arg| }'
249
- record.converted_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
248
+ record.old_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |arg| }'
249
+ record.new_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
250
250
  end
251
251
  end
252
252
 
@@ -280,8 +280,8 @@ module Transpec
280
280
 
281
281
  it 'adds record `expect_any_instance_of(Klass).to receive(:message) { |arg| }` ' \
282
282
  '-> `Klass.any_instance.should_receive(:message) { |instance, arg| }`' do
283
- record.original_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |arg| }'
284
- record.converted_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
283
+ record.old_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |arg| }'
284
+ record.new_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
285
285
  end
286
286
  end
287
287
 
@@ -314,8 +314,8 @@ module Transpec
314
314
 
315
315
  it 'adds record `expect_any_instance_of(Klass).to receive(:message) { |arg| }` ' \
316
316
  '-> `Klass.any_instance.should_receive(:message) { |instance, arg| }`' do
317
- record.original_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |arg| }'
318
- record.converted_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
317
+ record.old_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |arg| }'
318
+ record.new_syntax.should == 'expect_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
319
319
  end
320
320
  end
321
321
 
@@ -403,8 +403,8 @@ module Transpec
403
403
 
404
404
  it 'adds record `allow_any_instance_of(Klass).to receive(:message) { |arg| }` ' \
405
405
  '-> `Klass.any_instance.should_receive(:message) { |instance, arg| }`' do
406
- record.original_syntax.should == 'allow_any_instance_of(Klass).to receive(:message) { |arg| }'
407
- record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
406
+ record.old_syntax.should == 'allow_any_instance_of(Klass).to receive(:message) { |arg| }'
407
+ record.new_syntax.should == 'allow_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
408
408
  end
409
409
  end
410
410
 
@@ -437,8 +437,8 @@ module Transpec
437
437
 
438
438
  it 'adds record `allow_any_instance_of(Klass).to receive(:message) { |arg| }` ' \
439
439
  '-> `Klass.any_instance.should_receive(:message) { |instance, arg| }`' do
440
- record.original_syntax.should == 'allow_any_instance_of(Klass).to receive(:message) { |arg| }'
441
- record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
440
+ record.old_syntax.should == 'allow_any_instance_of(Klass).to receive(:message) { |arg| }'
441
+ record.new_syntax.should == 'allow_any_instance_of(Klass).to receive(:message) { |instance, arg| }'
442
442
  end
443
443
  end
444
444