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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/transpec/conversion_error.rb +5 -5
- data/lib/transpec/converter.rb +14 -12
- data/lib/transpec/record.rb +88 -31
- data/lib/transpec/report.rb +19 -11
- data/lib/transpec/rspec_version.rb +9 -0
- data/lib/transpec/syntax/be_boolean.rb +2 -2
- data/lib/transpec/syntax/be_close.rb +1 -1
- data/lib/transpec/syntax/current_example.rb +35 -17
- data/lib/transpec/syntax/double.rb +1 -1
- data/lib/transpec/syntax/example.rb +0 -4
- data/lib/transpec/syntax/example_group.rb +11 -11
- data/lib/transpec/syntax/have/{have_record.rb → record_builder.rb} +15 -17
- data/lib/transpec/syntax/have.rb +2 -2
- data/lib/transpec/syntax/hook.rb +3 -3
- data/lib/transpec/syntax/its.rb +25 -17
- data/lib/transpec/syntax/matcher_definition.rb +1 -2
- data/lib/transpec/syntax/method_stub.rb +44 -51
- data/lib/transpec/syntax/mixin/any_instance_block.rb +8 -6
- data/lib/transpec/syntax/mixin/useless_and_return.rb +9 -7
- data/lib/transpec/syntax/oneliner_should.rb +29 -27
- data/lib/transpec/syntax/operator.rb +3 -3
- data/lib/transpec/syntax/pending.rb +0 -4
- data/lib/transpec/syntax/raise_error.rb +35 -15
- data/lib/transpec/syntax/receive.rb +6 -6
- data/lib/transpec/syntax/rspec_configure/config_modification.rb +39 -5
- data/lib/transpec/syntax/rspec_configure/framework.rb +27 -7
- data/lib/transpec/syntax/rspec_configure/mocks.rb +2 -2
- data/lib/transpec/syntax/rspec_configure.rb +35 -4
- data/lib/transpec/syntax/should.rb +35 -20
- data/lib/transpec/syntax/should_receive.rb +30 -27
- data/lib/transpec/syntax.rb +10 -0
- data/lib/transpec/version.rb +2 -2
- data/spec/integration/configuration_modification_spec.rb +43 -3
- data/spec/transpec/record_spec.rb +113 -18
- data/spec/transpec/report_spec.rb +15 -6
- data/spec/transpec/rspec_version_spec.rb +5 -0
- data/spec/transpec/syntax/be_boolean_spec.rb +10 -10
- data/spec/transpec/syntax/be_close_spec.rb +2 -2
- data/spec/transpec/syntax/current_example_spec.rb +6 -6
- data/spec/transpec/syntax/double_spec.rb +2 -2
- data/spec/transpec/syntax/example_group_spec.rb +4 -4
- data/spec/transpec/syntax/example_spec.rb +8 -8
- data/spec/transpec/syntax/have_spec.rb +44 -44
- data/spec/transpec/syntax/hook_spec.rb +8 -8
- data/spec/transpec/syntax/its_spec.rb +16 -16
- data/spec/transpec/syntax/matcher_definition_spec.rb +2 -2
- data/spec/transpec/syntax/method_stub_spec.rb +36 -36
- data/spec/transpec/syntax/oneliner_should_spec.rb +26 -26
- data/spec/transpec/syntax/operator_spec.rb +18 -18
- data/spec/transpec/syntax/pending_spec.rb +6 -6
- data/spec/transpec/syntax/raise_error_spec.rb +10 -10
- data/spec/transpec/syntax/receive_spec.rb +20 -20
- data/spec/transpec/syntax/rspec_configure_spec.rb +202 -18
- data/spec/transpec/syntax/should_receive_spec.rb +30 -30
- data/spec/transpec/syntax/should_spec.rb +8 -8
- data/tasks/fixtures/mail/2.99.0/COMMIT_EDITMSG +1 -1
- data/tasks/fixtures/mail/3.0.0/COMMIT_EDITMSG +5 -2
- data/tasks/fixtures/twitter/2.99.0/COMMIT_EDITMSG +1 -1
- data/tasks/fixtures/twitter/3.0.0/COMMIT_EDITMSG +2 -2
- metadata +2 -2
@@ -116,8 +116,8 @@ module Transpec
|
|
116
116
|
end
|
117
117
|
|
118
118
|
it "adds record `#{method} { example }` -> `#{method} { |example| example }`" do
|
119
|
-
record.
|
120
|
-
record.
|
119
|
+
record.old_syntax.should == "#{method} { example }"
|
120
|
+
record.new_syntax.should == "#{method} { |example| example }"
|
121
121
|
end
|
122
122
|
end
|
123
123
|
end
|
@@ -149,8 +149,8 @@ module Transpec
|
|
149
149
|
end
|
150
150
|
|
151
151
|
it "adds record `#{method}(:name) { example }` -> `#{method}(:name) { |example| example }`" do
|
152
|
-
record.
|
153
|
-
record.
|
152
|
+
record.old_syntax.should == "#{method}(:name) { example }"
|
153
|
+
record.new_syntax.should == "#{method}(:name) { |example| example }"
|
154
154
|
end
|
155
155
|
end
|
156
156
|
end
|
@@ -312,8 +312,8 @@ module Transpec
|
|
312
312
|
end
|
313
313
|
|
314
314
|
it 'adds record `def helper_method example; end` -> `def helper_method RSpec.current_example; end`' do
|
315
|
-
record.
|
316
|
-
record.
|
315
|
+
record.old_syntax.should == 'def helper_method example; end'
|
316
|
+
record.new_syntax.should == 'def helper_method RSpec.current_example; end'
|
317
317
|
end
|
318
318
|
end
|
319
319
|
end
|
@@ -146,8 +146,8 @@ module Transpec
|
|
146
146
|
|
147
147
|
it "adds record `#{method}('something')` -> `double('something')`" do
|
148
148
|
record = double_object.report.records.first
|
149
|
-
record.
|
150
|
-
record.
|
149
|
+
record.old_syntax.should == "#{method}('something')"
|
150
|
+
record.new_syntax.should == "double('something')"
|
151
151
|
end
|
152
152
|
end
|
153
153
|
end
|
@@ -42,8 +42,8 @@ module Transpec
|
|
42
42
|
|
43
43
|
it "adds record `#{method} 'something' { }` -> `RSpec.#{method} 'something' { }`" do
|
44
44
|
example_group.convert_to_non_monkey_patch!
|
45
|
-
record.
|
46
|
-
record.
|
45
|
+
record.old_syntax.should == "#{method} 'something' { }"
|
46
|
+
record.new_syntax.should == "RSpec.#{method} 'something' { }"
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
@@ -224,8 +224,8 @@ module Transpec
|
|
224
224
|
|
225
225
|
it "adds record `describe 'some #{type}' { }` " \
|
226
226
|
"-> `describe 'some #{type}', :type => #{type.inspect} { }`" do
|
227
|
-
record.
|
228
|
-
record.
|
227
|
+
record.old_syntax.should == "describe 'some #{type}' { }"
|
228
|
+
record.new_syntax.should == "describe 'some #{type}', :type => #{type.inspect} { }"
|
229
229
|
end
|
230
230
|
end
|
231
231
|
end
|
@@ -184,8 +184,8 @@ module Transpec
|
|
184
184
|
end
|
185
185
|
|
186
186
|
it "adds record `pending 'is an example' { }` -> `skip 'is an example' { }`" do
|
187
|
-
record.
|
188
|
-
record.
|
187
|
+
record.old_syntax.should == "pending 'is an example' { }"
|
188
|
+
record.new_syntax.should == "skip 'is an example' { }"
|
189
189
|
end
|
190
190
|
end
|
191
191
|
|
@@ -231,8 +231,8 @@ module Transpec
|
|
231
231
|
end
|
232
232
|
|
233
233
|
it "adds record `it 'is an example', :pending { }` -> `it 'is an example', :skip { }`" do
|
234
|
-
record.
|
235
|
-
record.
|
234
|
+
record.old_syntax.should == "it 'is an example', :pending { }"
|
235
|
+
record.new_syntax.should == "it 'is an example', :skip { }"
|
236
236
|
end
|
237
237
|
end
|
238
238
|
|
@@ -262,8 +262,8 @@ module Transpec
|
|
262
262
|
end
|
263
263
|
|
264
264
|
it "adds record `it 'is an example', :pending => value { }` -> `it 'is an example', :skip => value { }`" do
|
265
|
-
record.
|
266
|
-
record.
|
265
|
+
record.old_syntax.should == "it 'is an example', :pending => value { }"
|
266
|
+
record.new_syntax.should == "it 'is an example', :skip => value { }"
|
267
267
|
end
|
268
268
|
end
|
269
269
|
|
@@ -293,8 +293,8 @@ module Transpec
|
|
293
293
|
end
|
294
294
|
|
295
295
|
it "adds record `it 'is an example', :pending => value { }` -> `it 'is an example', :skip => value { }`" do
|
296
|
-
record.
|
297
|
-
record.
|
296
|
+
record.old_syntax.should == "it 'is an example', :pending => value { }"
|
297
|
+
record.new_syntax.should == "it 'is an example', :skip => value { }"
|
298
298
|
end
|
299
299
|
end
|
300
300
|
end
|
@@ -253,8 +253,8 @@ module Transpec
|
|
253
253
|
|
254
254
|
it 'adds record `collection.should have(n).items` -> `collection.size.should == n`' do
|
255
255
|
have_object.convert_to_standard_expectation!
|
256
|
-
record.
|
257
|
-
record.
|
256
|
+
record.old_syntax.should == 'collection.should have(n).items'
|
257
|
+
record.new_syntax.should == 'collection.size.should == n'
|
258
258
|
end
|
259
259
|
|
260
260
|
context 'and Should#expectize! is invoked before it' do
|
@@ -280,8 +280,8 @@ module Transpec
|
|
280
280
|
end
|
281
281
|
|
282
282
|
it 'adds record `collection.should have(n).items` -> `expect(collection.size).to eq(n)`' do
|
283
|
-
record.
|
284
|
-
record.
|
283
|
+
record.old_syntax.should == 'collection.should have(n).items'
|
284
|
+
record.new_syntax.should == 'expect(collection.size).to eq(n)'
|
285
285
|
end
|
286
286
|
|
287
287
|
context 'and false is passed as `parenthesize_matcher_arg` argument' do
|
@@ -302,8 +302,8 @@ module Transpec
|
|
302
302
|
end
|
303
303
|
|
304
304
|
it 'adds record `collection.should have(n).items` -> `expect(collection.size).to eq(n)`' do
|
305
|
-
record.
|
306
|
-
record.
|
305
|
+
record.old_syntax.should == 'collection.should have(n).items'
|
306
|
+
record.new_syntax.should == 'expect(collection.size).to eq(n)'
|
307
307
|
end
|
308
308
|
end
|
309
309
|
end
|
@@ -339,8 +339,8 @@ module Transpec
|
|
339
339
|
|
340
340
|
it 'adds record `collection.should_not have(n).items` -> `collection.size.should_not == n`' do
|
341
341
|
have_object.convert_to_standard_expectation!
|
342
|
-
record.
|
343
|
-
record.
|
342
|
+
record.old_syntax.should == 'collection.should_not have(n).items'
|
343
|
+
record.new_syntax.should == 'collection.size.should_not == n'
|
344
344
|
end
|
345
345
|
end
|
346
346
|
|
@@ -374,8 +374,8 @@ module Transpec
|
|
374
374
|
|
375
375
|
it 'adds record `collection.should have_at_least(n).items` -> `collection.size.should >= n`' do
|
376
376
|
have_object.convert_to_standard_expectation!
|
377
|
-
record.
|
378
|
-
record.
|
377
|
+
record.old_syntax.should == 'collection.should have_at_least(n).items'
|
378
|
+
record.new_syntax.should == 'collection.size.should >= n'
|
379
379
|
end
|
380
380
|
end
|
381
381
|
|
@@ -409,8 +409,8 @@ module Transpec
|
|
409
409
|
|
410
410
|
it 'adds record `collection.should have_at_most(n).items` -> `collection.size.should <= n`' do
|
411
411
|
have_object.convert_to_standard_expectation!
|
412
|
-
record.
|
413
|
-
record.
|
412
|
+
record.old_syntax.should == 'collection.should have_at_most(n).items'
|
413
|
+
record.new_syntax.should == 'collection.size.should <= n'
|
414
414
|
end
|
415
415
|
end
|
416
416
|
|
@@ -461,8 +461,8 @@ module Transpec
|
|
461
461
|
it 'adds record `expect(collection).to have(n).items` -> `expect(collection.size).to eq(n)` ' \
|
462
462
|
'without annotation' do
|
463
463
|
have_object.convert_to_standard_expectation!
|
464
|
-
record.
|
465
|
-
record.
|
464
|
+
record.old_syntax.should == 'expect(collection).to have(n).items'
|
465
|
+
record.new_syntax.should == 'expect(collection.size).to eq(n)'
|
466
466
|
record.annotation.should be_nil
|
467
467
|
end
|
468
468
|
end
|
@@ -498,8 +498,8 @@ module Transpec
|
|
498
498
|
'with annotation' do
|
499
499
|
have_object.convert_to_standard_expectation!
|
500
500
|
|
501
|
-
record.
|
502
|
-
record.
|
501
|
+
record.old_syntax.should == 'expect(collection).to have(n).items'
|
502
|
+
record.new_syntax.should == 'expect(collection.size).to eq(n)'
|
503
503
|
|
504
504
|
record.annotation.message.should ==
|
505
505
|
'The `have(2).items` has been converted but it might possibly be incorrect ' \
|
@@ -539,8 +539,8 @@ module Transpec
|
|
539
539
|
|
540
540
|
it 'adds record `expect(collection).not_to have(n).items` -> `expect(collection.size).not_to eq(n)`' do
|
541
541
|
have_object.convert_to_standard_expectation!
|
542
|
-
record.
|
543
|
-
record.
|
542
|
+
record.old_syntax.should == 'expect(collection).not_to have(n).items'
|
543
|
+
record.new_syntax.should == 'expect(collection.size).not_to eq(n)'
|
544
544
|
end
|
545
545
|
end
|
546
546
|
|
@@ -574,8 +574,8 @@ module Transpec
|
|
574
574
|
|
575
575
|
it 'adds record `expect(collection).to have_at_least(n).items` -> `expect(collection.size).to be >= n`' do
|
576
576
|
have_object.convert_to_standard_expectation!
|
577
|
-
record.
|
578
|
-
record.
|
577
|
+
record.old_syntax.should == 'expect(collection).to have_at_least(n).items'
|
578
|
+
record.new_syntax.should == 'expect(collection.size).to be >= n'
|
579
579
|
end
|
580
580
|
end
|
581
581
|
|
@@ -609,8 +609,8 @@ module Transpec
|
|
609
609
|
|
610
610
|
it 'adds record `expect(collection).to have_at_most(n).items` -> `expect(collection.size).to be <= n`' do
|
611
611
|
have_object.convert_to_standard_expectation!
|
612
|
-
record.
|
613
|
-
record.
|
612
|
+
record.old_syntax.should == 'expect(collection).to have_at_most(n).items'
|
613
|
+
record.new_syntax.should == 'expect(collection.size).to be <= n'
|
614
614
|
end
|
615
615
|
end
|
616
616
|
|
@@ -661,8 +661,8 @@ module Transpec
|
|
661
661
|
|
662
662
|
it 'adds record `expect(obj).to have(n).words` -> `expect(obj.words.size).to eq(n)`' do
|
663
663
|
have_object.convert_to_standard_expectation!
|
664
|
-
record.
|
665
|
-
record.
|
664
|
+
record.old_syntax.should == 'expect(obj).to have(n).words'
|
665
|
+
record.new_syntax.should == 'expect(obj.words.size).to eq(n)'
|
666
666
|
end
|
667
667
|
end
|
668
668
|
|
@@ -718,8 +718,8 @@ module Transpec
|
|
718
718
|
|
719
719
|
it 'adds record `expect(obj).to have(n).words` -> `expect(obj.words.count).to eq(n)`' do
|
720
720
|
have_object.convert_to_standard_expectation!
|
721
|
-
record.
|
722
|
-
record.
|
721
|
+
record.old_syntax.should == 'expect(obj).to have(n).words'
|
722
|
+
record.new_syntax.should == 'expect(obj.words.count).to eq(n)'
|
723
723
|
end
|
724
724
|
end
|
725
725
|
end
|
@@ -753,8 +753,8 @@ module Transpec
|
|
753
753
|
|
754
754
|
it 'adds record `expect(collection).to have(n).items` -> `expect(collection.size).to eq(n)`' do
|
755
755
|
have_object.convert_to_standard_expectation!
|
756
|
-
record.
|
757
|
-
record.
|
756
|
+
record.old_syntax.should == 'expect(collection).to have(n).items'
|
757
|
+
record.new_syntax.should == 'expect(collection.size).to eq(n)'
|
758
758
|
end
|
759
759
|
end
|
760
760
|
|
@@ -800,8 +800,8 @@ module Transpec
|
|
800
800
|
|
801
801
|
it 'adds record `expect(obj).to have(n).words` -> `expect(obj.send(:words).size).to eq(n)`' do
|
802
802
|
have_object.convert_to_standard_expectation!
|
803
|
-
record.
|
804
|
-
record.
|
803
|
+
record.old_syntax.should == 'expect(obj).to have(n).words'
|
804
|
+
record.new_syntax.should == 'expect(obj.send(:words).size).to eq(n)'
|
805
805
|
end
|
806
806
|
end
|
807
807
|
end
|
@@ -847,8 +847,8 @@ module Transpec
|
|
847
847
|
|
848
848
|
it 'adds record `expect(collection).to have(n).items` -> `expect(collection.size).to eq(n)`' do
|
849
849
|
have_object.convert_to_standard_expectation!
|
850
|
-
record.
|
851
|
-
record.
|
850
|
+
record.old_syntax.should == 'expect(collection).to have(n).items'
|
851
|
+
record.new_syntax.should == 'expect(collection.size).to eq(n)'
|
852
852
|
end
|
853
853
|
end
|
854
854
|
end
|
@@ -904,8 +904,8 @@ module Transpec
|
|
904
904
|
|
905
905
|
it 'adds record `expect(obj).to have(n).words` -> `expect(obj.words.size).to eq(n)`' do
|
906
906
|
have_object.convert_to_standard_expectation!
|
907
|
-
record.
|
908
|
-
record.
|
907
|
+
record.old_syntax.should == 'expect(obj).to have(n).words'
|
908
|
+
record.new_syntax.should == 'expect(obj.words.size).to eq(n)'
|
909
909
|
end
|
910
910
|
end
|
911
911
|
|
@@ -949,8 +949,8 @@ module Transpec
|
|
949
949
|
|
950
950
|
it 'adds record `expect(collection).to have(n).items` -> `expect(collection.size).to eq(n)`' do
|
951
951
|
have_object.convert_to_standard_expectation!
|
952
|
-
record.
|
953
|
-
record.
|
952
|
+
record.old_syntax.should == 'expect(collection).to have(n).items'
|
953
|
+
record.new_syntax.should == 'expect(collection.size).to eq(n)'
|
954
954
|
end
|
955
955
|
end
|
956
956
|
end
|
@@ -1000,8 +1000,8 @@ module Transpec
|
|
1000
1000
|
|
1001
1001
|
it 'adds record `expect(collection).to have(n).items` -> `expect(collection.size).to eq(n)`' do
|
1002
1002
|
have_object.convert_to_standard_expectation!
|
1003
|
-
record.
|
1004
|
-
record.
|
1003
|
+
record.old_syntax.should == 'expect(collection).to have(n).items'
|
1004
|
+
record.new_syntax.should == 'expect(collection.size).to eq(n)'
|
1005
1005
|
end
|
1006
1006
|
end
|
1007
1007
|
end
|
@@ -1053,8 +1053,8 @@ module Transpec
|
|
1053
1053
|
it 'adds record ' \
|
1054
1054
|
'`expect(obj).to have(n).attrs_on(...)` -> `expect(obj.attrs_on(...).size).to eq(n)`' do
|
1055
1055
|
have_object.convert_to_standard_expectation!
|
1056
|
-
record.
|
1057
|
-
record.
|
1056
|
+
record.old_syntax.should == 'expect(obj).to have(n).attrs_on(...)'
|
1057
|
+
record.new_syntax.should == 'expect(obj.attrs_on(...).size).to eq(n)'
|
1058
1058
|
end
|
1059
1059
|
end
|
1060
1060
|
|
@@ -1103,8 +1103,8 @@ module Transpec
|
|
1103
1103
|
it 'adds record ' \
|
1104
1104
|
'`expect(obj).to have(n).attrs_on(...)` -> `expect(obj.send(:attrs_on, ...).size).to eq(n)`' do
|
1105
1105
|
have_object.convert_to_standard_expectation!
|
1106
|
-
record.
|
1107
|
-
record.
|
1106
|
+
record.old_syntax.should == 'expect(obj).to have(n).attrs_on(...)'
|
1107
|
+
record.new_syntax.should == 'expect(obj.send(:attrs_on, ...).size).to eq(n)'
|
1108
1108
|
end
|
1109
1109
|
end
|
1110
1110
|
end
|
@@ -1150,8 +1150,8 @@ module Transpec
|
|
1150
1150
|
it 'adds record ' \
|
1151
1151
|
'`expect(obj).to have(n).attrs_on(...)` -> `expect(obj.attrs_on(...).size).to eq(n)`' do
|
1152
1152
|
have_object.convert_to_standard_expectation!
|
1153
|
-
record.
|
1154
|
-
record.
|
1153
|
+
record.old_syntax.should == 'expect(obj).to have(n).attrs_on(...)'
|
1154
|
+
record.new_syntax.should == 'expect(obj.attrs_on(...).size).to eq(n)'
|
1155
1155
|
end
|
1156
1156
|
end
|
1157
1157
|
end
|
@@ -43,8 +43,8 @@ module Transpec
|
|
43
43
|
end
|
44
44
|
|
45
45
|
it "adds record `#{hook_method}(:each) { }` -> `#{hook_method}(:example) { }`" do
|
46
|
-
record.
|
47
|
-
record.
|
46
|
+
record.old_syntax.should == "#{hook_method}(:each) { }"
|
47
|
+
record.new_syntax.should == "#{hook_method}(:example) { }"
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -76,8 +76,8 @@ module Transpec
|
|
76
76
|
end
|
77
77
|
|
78
78
|
it "adds record `#{hook_method}(:all) { }` -> `#{hook_method}(:context) { }`" do
|
79
|
-
record.
|
80
|
-
record.
|
79
|
+
record.old_syntax.should == "#{hook_method}(:all) { }"
|
80
|
+
record.new_syntax.should == "#{hook_method}(:context) { }"
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -107,8 +107,8 @@ module Transpec
|
|
107
107
|
end
|
108
108
|
|
109
109
|
it "adds record `#{hook_method}(:each) { }` -> `#{hook_method}(:example) { }`" do
|
110
|
-
record.
|
111
|
-
record.
|
110
|
+
record.old_syntax.should == "#{hook_method}(:each) { }"
|
111
|
+
record.new_syntax.should == "#{hook_method}(:example) { }"
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
@@ -205,8 +205,8 @@ module Transpec
|
|
205
205
|
end
|
206
206
|
|
207
207
|
it 'adds record `before(:each) { }` -> `before(:example) { }`' do
|
208
|
-
record.
|
209
|
-
record.
|
208
|
+
record.old_syntax.should == 'before(:each) { }'
|
209
|
+
record.new_syntax.should == 'before(:example) { }'
|
210
210
|
end
|
211
211
|
end
|
212
212
|
end
|
@@ -88,8 +88,8 @@ module Transpec
|
|
88
88
|
end
|
89
89
|
|
90
90
|
it "adds record `its(:attr) { }` -> `describe '#attr' do subject { super().attr }; it { } end`" do
|
91
|
-
record.
|
92
|
-
record.
|
91
|
+
record.old_syntax.should == 'its(:attr) { }'
|
92
|
+
record.new_syntax.should == "describe '#attr' do subject { super().attr }; it { } end"
|
93
93
|
end
|
94
94
|
|
95
95
|
context 'and there are consecutive blanks between the #its and the block' do
|
@@ -213,8 +213,8 @@ module Transpec
|
|
213
213
|
end
|
214
214
|
|
215
215
|
it "adds record `its(:attr) { }` -> `describe '#attr' do subject { super().attr }; it { } end`" do
|
216
|
-
record.
|
217
|
-
record.
|
216
|
+
record.old_syntax.should == 'its(:attr) { }'
|
217
|
+
record.new_syntax.should == "describe '#attr' do subject { super().attr }; it { } end"
|
218
218
|
end
|
219
219
|
end
|
220
220
|
|
@@ -250,8 +250,8 @@ module Transpec
|
|
250
250
|
end
|
251
251
|
|
252
252
|
it "adds record `its(:attr) { }` -> `describe '#attr' do subject { super().attr }; it { } end`" do
|
253
|
-
record.
|
254
|
-
record.
|
253
|
+
record.old_syntax.should == 'its(:attr) { }'
|
254
|
+
record.new_syntax.should == "describe '#attr' do subject { super().attr }; it { } end"
|
255
255
|
end
|
256
256
|
end
|
257
257
|
|
@@ -284,8 +284,8 @@ module Transpec
|
|
284
284
|
end
|
285
285
|
|
286
286
|
it "adds record `its([:key]) { }` -> `describe '[:key]' do subject { super()[:key] }; it { } end`" do
|
287
|
-
record.
|
288
|
-
record.
|
287
|
+
record.old_syntax.should == 'its([:key]) { }'
|
288
|
+
record.new_syntax.should == "describe '[:key]' do subject { super()[:key] }; it { } end"
|
289
289
|
end
|
290
290
|
end
|
291
291
|
|
@@ -318,8 +318,8 @@ module Transpec
|
|
318
318
|
end
|
319
319
|
|
320
320
|
it "adds record `its([:key]) { }` -> `describe '[:key]' do subject { super()[:key] }; it { } end`" do
|
321
|
-
record.
|
322
|
-
record.
|
321
|
+
record.old_syntax.should == 'its([:key]) { }'
|
322
|
+
record.new_syntax.should == "describe '[:key]' do subject { super()[:key] }; it { } end"
|
323
323
|
end
|
324
324
|
end
|
325
325
|
|
@@ -352,8 +352,8 @@ module Transpec
|
|
352
352
|
end
|
353
353
|
|
354
354
|
it "adds record `its([:key]) { }` -> `describe '[:key]' do subject { super()[:key] }; it { } end`" do
|
355
|
-
record.
|
356
|
-
record.
|
355
|
+
record.old_syntax.should == 'its([:key]) { }'
|
356
|
+
record.new_syntax.should == "describe '[:key]' do subject { super()[:key] }; it { } end"
|
357
357
|
end
|
358
358
|
end
|
359
359
|
|
@@ -396,8 +396,8 @@ module Transpec
|
|
396
396
|
end
|
397
397
|
|
398
398
|
it "adds record `its(:attr) { }` -> `describe '#attr' do subject { super().attr }; it { } end`" do
|
399
|
-
record.
|
400
|
-
record.
|
399
|
+
record.old_syntax.should == 'its(:attr) { }'
|
400
|
+
record.new_syntax.should == "describe '#attr' do subject { super().attr }; it { } end"
|
401
401
|
end
|
402
402
|
end
|
403
403
|
|
@@ -440,8 +440,8 @@ module Transpec
|
|
440
440
|
end
|
441
441
|
|
442
442
|
it "adds record `its([:key]) { }` -> `describe '[:key]' do subject { super()[:key] }; it { } end`" do
|
443
|
-
record.
|
444
|
-
record.
|
443
|
+
record.old_syntax.should == 'its([:key]) { }'
|
444
|
+
record.new_syntax.should == "describe '[:key]' do subject { super()[:key] }; it { } end"
|
445
445
|
end
|
446
446
|
end
|
447
447
|
end
|
@@ -48,8 +48,8 @@ module Transpec
|
|
48
48
|
end
|
49
49
|
|
50
50
|
it "adds record `#{target_method} { }` -> `#{converted_method} { }`" do
|
51
|
-
record.
|
52
|
-
record.
|
51
|
+
record.old_syntax.should == "#{target_method} { }"
|
52
|
+
record.new_syntax.should == "#{converted_method} { }"
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|