transpec 1.10.2 → 1.10.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Guardfile +2 -2
- data/README.md +2 -1
- data/README.md.erb +2 -1
- data/lib/transpec/cli.rb +23 -7
- data/lib/transpec/conversion_error.rb +1 -1
- data/lib/transpec/dynamic_analyzer.rb +21 -11
- data/lib/transpec/file_finder.rb +1 -1
- data/lib/transpec/version.rb +1 -1
- data/spec/transpec/cli_spec.rb +22 -0
- data/spec/transpec/dynamic_analyzer_spec.rb +2 -2
- data/spec/transpec/syntax/be_boolean_spec.rb +9 -9
- data/spec/transpec/syntax/be_close_spec.rb +2 -2
- data/spec/transpec/syntax/current_example_spec.rb +13 -13
- data/spec/transpec/syntax/double_spec.rb +3 -3
- data/spec/transpec/syntax/example_spec.rb +14 -14
- data/spec/transpec/syntax/have_spec.rb +41 -41
- 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 +47 -47
- data/spec/transpec/syntax/oneliner_should_spec.rb +28 -28
- data/spec/transpec/syntax/operator_spec.rb +36 -36
- data/spec/transpec/syntax/pending_spec.rb +20 -20
- data/spec/transpec/syntax/raise_error_spec.rb +17 -17
- data/spec/transpec/syntax/receive_spec.rb +28 -28
- data/spec/transpec/syntax/rspec_configure_spec.rb +1 -1
- data/spec/transpec/syntax/should_receive_spec.rb +48 -48
- data/spec/transpec/syntax/should_spec.rb +15 -15
- data/transpec.gemspec +2 -1
- metadata +18 -4
@@ -185,7 +185,7 @@ module Transpec
|
|
185
185
|
end
|
186
186
|
end
|
187
187
|
|
188
|
-
context '
|
188
|
+
context 'with expression `obj.should`' do
|
189
189
|
let(:source) do
|
190
190
|
<<-END
|
191
191
|
describe 'example' do
|
@@ -206,7 +206,7 @@ module Transpec
|
|
206
206
|
END
|
207
207
|
end
|
208
208
|
|
209
|
-
it 'converts
|
209
|
+
it 'converts to `expect(obj).to` form' do
|
210
210
|
should_object.expectize!
|
211
211
|
rewritten_source.should == expected_source
|
212
212
|
end
|
@@ -316,7 +316,7 @@ module Transpec
|
|
316
316
|
end
|
317
317
|
end
|
318
318
|
|
319
|
-
context '
|
319
|
+
context 'with expression `obj.should_not`' do
|
320
320
|
let(:source) do
|
321
321
|
<<-END
|
322
322
|
describe 'example' do
|
@@ -337,7 +337,7 @@ module Transpec
|
|
337
337
|
END
|
338
338
|
end
|
339
339
|
|
340
|
-
it 'converts
|
340
|
+
it 'converts to `expect(obj).not_to` form' do
|
341
341
|
should_object.expectize!
|
342
342
|
rewritten_source.should == expected_source
|
343
343
|
end
|
@@ -359,7 +359,7 @@ module Transpec
|
|
359
359
|
END
|
360
360
|
end
|
361
361
|
|
362
|
-
it 'converts
|
362
|
+
it 'converts to `expect(obj).to_not` form' do
|
363
363
|
should_object.expectize!('to_not')
|
364
364
|
rewritten_source.should == expected_source
|
365
365
|
end
|
@@ -372,7 +372,7 @@ module Transpec
|
|
372
372
|
end
|
373
373
|
end
|
374
374
|
|
375
|
-
context '
|
375
|
+
context 'with expression `(obj).should`' do
|
376
376
|
let(:source) do
|
377
377
|
<<-END
|
378
378
|
describe 'example' do
|
@@ -393,13 +393,13 @@ module Transpec
|
|
393
393
|
END
|
394
394
|
end
|
395
395
|
|
396
|
-
it 'converts
|
396
|
+
it 'converts to `expect(obj).to` form without superfluous parentheses' do
|
397
397
|
should_object.expectize!
|
398
398
|
rewritten_source.should == expected_source
|
399
399
|
end
|
400
400
|
end
|
401
401
|
|
402
|
-
context '
|
402
|
+
context 'with expression `obj.should() == 1`' do
|
403
403
|
let(:source) do
|
404
404
|
<<-END
|
405
405
|
describe 'example' do
|
@@ -420,7 +420,7 @@ module Transpec
|
|
420
420
|
END
|
421
421
|
end
|
422
422
|
|
423
|
-
it 'converts
|
423
|
+
it 'converts to `expect(obj).to eq(1)` form' do
|
424
424
|
should_object.expectize!
|
425
425
|
rewritten_source.should == expected_source
|
426
426
|
end
|
@@ -432,7 +432,7 @@ module Transpec
|
|
432
432
|
'Proc.new', '::Proc.new',
|
433
433
|
'->'
|
434
434
|
].each do |method|
|
435
|
-
context "
|
435
|
+
context "with expression `#{method} { ... }.should`" do
|
436
436
|
let(:source) do
|
437
437
|
<<-END
|
438
438
|
describe 'example' do
|
@@ -453,7 +453,7 @@ module Transpec
|
|
453
453
|
END
|
454
454
|
end
|
455
455
|
|
456
|
-
it 'converts
|
456
|
+
it 'converts to `expect {...}.to` form' do
|
457
457
|
should_object.expectize!
|
458
458
|
rewritten_source.should == expected_source
|
459
459
|
end
|
@@ -467,7 +467,7 @@ module Transpec
|
|
467
467
|
end
|
468
468
|
|
469
469
|
['MyObject.lambda', 'MyObject.proc', 'MyObject.new'].each do |method|
|
470
|
-
context "
|
470
|
+
context "with expression `#{method} { ... }.should`" do
|
471
471
|
let(:source) do
|
472
472
|
<<-END
|
473
473
|
describe 'example' do
|
@@ -488,14 +488,14 @@ module Transpec
|
|
488
488
|
END
|
489
489
|
end
|
490
490
|
|
491
|
-
it "converts
|
491
|
+
it "converts to `expect(#{method} { ... }).to` form" do
|
492
492
|
should_object.expectize!
|
493
493
|
rewritten_source.should == expected_source
|
494
494
|
end
|
495
495
|
end
|
496
496
|
end
|
497
497
|
|
498
|
-
context '
|
498
|
+
context 'with expression `method { ... }.should` but the subject object is not proc' do
|
499
499
|
let(:source) do
|
500
500
|
<<-END
|
501
501
|
describe 'example' do
|
@@ -516,7 +516,7 @@ module Transpec
|
|
516
516
|
END
|
517
517
|
end
|
518
518
|
|
519
|
-
it 'converts
|
519
|
+
it 'converts to `expect(method { ... }).to` form' do
|
520
520
|
should_object.expectize!
|
521
521
|
rewritten_source.should == expected_source
|
522
522
|
end
|
data/transpec.gemspec
CHANGED
@@ -30,8 +30,9 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_development_dependency 'rake', '~> 10.1'
|
32
32
|
spec.add_development_dependency 'rspec', '~> 2.14'
|
33
|
+
spec.add_development_dependency 'fuubar', '~> 1.3'
|
33
34
|
spec.add_development_dependency 'simplecov', '~> 0.7'
|
34
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
35
|
+
spec.add_development_dependency 'rubocop', '~> 0.19'
|
35
36
|
spec.add_development_dependency 'guard-rspec', '>= 4.2.3', '< 5.0'
|
36
37
|
spec.add_development_dependency 'guard-rubocop', '~> 1.0'
|
37
38
|
spec.add_development_dependency 'guard-shell', '~> 0.5'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transpec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Nakayama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -120,6 +120,20 @@ dependencies:
|
|
120
120
|
- - "~>"
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '2.14'
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: fuubar
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - "~>"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '1.3'
|
130
|
+
type: :development
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - "~>"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '1.3'
|
123
137
|
- !ruby/object:Gem::Dependency
|
124
138
|
name: simplecov
|
125
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,14 +154,14 @@ dependencies:
|
|
140
154
|
requirements:
|
141
155
|
- - "~>"
|
142
156
|
- !ruby/object:Gem::Version
|
143
|
-
version: '0.
|
157
|
+
version: '0.19'
|
144
158
|
type: :development
|
145
159
|
prerelease: false
|
146
160
|
version_requirements: !ruby/object:Gem::Requirement
|
147
161
|
requirements:
|
148
162
|
- - "~>"
|
149
163
|
- !ruby/object:Gem::Version
|
150
|
-
version: '0.
|
164
|
+
version: '0.19'
|
151
165
|
- !ruby/object:Gem::Dependency
|
152
166
|
name: guard-rspec
|
153
167
|
requirement: !ruby/object:Gem::Requirement
|