transpec 0.2.6 → 1.0.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/.gitignore +1 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +10 -0
- data/README.md +111 -56
- data/README.md.erb +117 -62
- data/lib/transpec/ast/node.rb +41 -0
- data/lib/transpec/base_rewriter.rb +55 -0
- data/lib/transpec/cli.rb +43 -153
- data/lib/transpec/configuration.rb +13 -9
- data/lib/transpec/{rewriter.rb → converter.rb} +44 -71
- data/lib/transpec/dynamic_analyzer/rewriter.rb +94 -0
- data/lib/transpec/dynamic_analyzer/runtime_data.rb +27 -0
- data/lib/transpec/dynamic_analyzer.rb +166 -0
- data/lib/transpec/file_finder.rb +53 -0
- data/lib/transpec/option_parser.rb +166 -0
- data/lib/transpec/{context.rb → static_context_inspector.rb} +2 -2
- data/lib/transpec/syntax/be_close.rb +7 -9
- data/lib/transpec/syntax/double.rb +6 -10
- data/lib/transpec/syntax/expect.rb +35 -0
- data/lib/transpec/syntax/have.rb +195 -0
- data/lib/transpec/syntax/method_stub.rb +22 -27
- data/lib/transpec/syntax/mixin/allow_no_message.rb +73 -0
- data/lib/transpec/syntax/mixin/any_instance.rb +22 -0
- data/lib/transpec/syntax/mixin/expectizable.rb +26 -0
- data/lib/transpec/syntax/mixin/have_matcher.rb +23 -0
- data/lib/transpec/syntax/mixin/monkey_patch.rb +37 -0
- data/lib/transpec/syntax/mixin/send.rb +109 -0
- data/lib/transpec/syntax/{matcher.rb → operator_matcher.rb} +27 -14
- data/lib/transpec/syntax/raise_error.rb +6 -10
- data/lib/transpec/syntax/rspec_configure.rb +29 -28
- data/lib/transpec/syntax/should.rb +45 -15
- data/lib/transpec/syntax/should_receive.rb +44 -16
- data/lib/transpec/syntax.rb +29 -21
- data/lib/transpec/util.rb +12 -2
- data/lib/transpec/version.rb +3 -3
- data/spec/spec_helper.rb +8 -6
- data/spec/support/cache_helper.rb +50 -0
- data/spec/support/shared_context.rb +49 -1
- data/spec/transpec/ast/node_spec.rb +65 -0
- data/spec/transpec/cli_spec.rb +33 -242
- data/spec/transpec/commit_message_spec.rb +2 -2
- data/spec/transpec/configuration_spec.rb +12 -8
- data/spec/transpec/{rewriter_spec.rb → converter_spec.rb} +198 -148
- data/spec/transpec/dynamic_analyzer/rewriter_spec.rb +183 -0
- data/spec/transpec/dynamic_analyzer_spec.rb +164 -0
- data/spec/transpec/file_finder_spec.rb +118 -0
- data/spec/transpec/option_parser_spec.rb +185 -0
- data/spec/transpec/{context_spec.rb → static_context_inspector_spec.rb} +27 -12
- data/spec/transpec/syntax/be_close_spec.rb +8 -4
- data/spec/transpec/syntax/double_spec.rb +105 -12
- data/spec/transpec/syntax/expect_spec.rb +83 -0
- data/spec/transpec/syntax/have_spec.rb +599 -0
- data/spec/transpec/syntax/method_stub_spec.rb +276 -115
- data/spec/transpec/syntax/{matcher_spec.rb → operator_matcher_spec.rb} +277 -98
- data/spec/transpec/syntax/raise_error_spec.rb +92 -46
- data/spec/transpec/syntax/should_receive_spec.rb +298 -92
- data/spec/transpec/syntax/should_spec.rb +230 -44
- data/spec/transpec/util_spec.rb +2 -9
- data/tasks/lib/transpec_demo.rb +1 -1
- data/tasks/lib/transpec_test.rb +5 -7
- data/tasks/test.rake +5 -1
- data/transpec.gemspec +1 -1
- metadata +46 -22
- data/lib/transpec/syntax/able_to_allow_no_message.rb +0 -73
- data/lib/transpec/syntax/able_to_target_any_instance.rb +0 -24
- data/lib/transpec/syntax/expectizable.rb +0 -27
- data/lib/transpec/syntax/send_node_syntax.rb +0 -57
@@ -11,16 +11,14 @@ module Transpec
|
|
11
11
|
|
12
12
|
let(:record) { should_object.report.records.first }
|
13
13
|
|
14
|
-
before do
|
15
|
-
should_object.context.stub(:expect_to_matcher_available?).and_return(true)
|
16
|
-
end
|
17
|
-
|
18
14
|
describe '#matcher_node' do
|
19
15
|
context 'when it is taking operator matcher' do
|
20
16
|
let(:source) do
|
21
17
|
<<-END
|
22
|
-
|
23
|
-
|
18
|
+
describe 'example' do
|
19
|
+
it 'is 1' do
|
20
|
+
subject.should == 1
|
21
|
+
end
|
24
22
|
end
|
25
23
|
END
|
26
24
|
end
|
@@ -43,8 +41,10 @@ module Transpec
|
|
43
41
|
context 'when it is taking non-operator matcher without argument' do
|
44
42
|
let(:source) do
|
45
43
|
<<-END
|
46
|
-
|
47
|
-
|
44
|
+
describe 'example' do
|
45
|
+
it 'is empty' do
|
46
|
+
subject.should be_empty
|
47
|
+
end
|
48
48
|
end
|
49
49
|
END
|
50
50
|
end
|
@@ -66,8 +66,10 @@ module Transpec
|
|
66
66
|
context 'when it is taking non-operator matcher with argument' do
|
67
67
|
let(:source) do
|
68
68
|
<<-END
|
69
|
-
|
70
|
-
|
69
|
+
describe 'example' do
|
70
|
+
it 'is 1' do
|
71
|
+
subject.should eq(1)
|
72
|
+
end
|
71
73
|
end
|
72
74
|
END
|
73
75
|
end
|
@@ -88,33 +90,127 @@ module Transpec
|
|
88
90
|
end
|
89
91
|
end
|
90
92
|
|
93
|
+
describe '#operator_matcher' do
|
94
|
+
subject { should_object.operator_matcher }
|
95
|
+
|
96
|
+
context 'when it is taking operator matcher' do
|
97
|
+
let(:source) do
|
98
|
+
<<-END
|
99
|
+
describe 'example' do
|
100
|
+
it 'is 1' do
|
101
|
+
subject.should == 1
|
102
|
+
end
|
103
|
+
end
|
104
|
+
END
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'returns an instance of OperatorMatcher' do
|
108
|
+
should be_an(OperatorMatcher)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
context 'when it is taking non-operator matcher' do
|
113
|
+
let(:source) do
|
114
|
+
<<-END
|
115
|
+
describe 'example' do
|
116
|
+
it 'is empty' do
|
117
|
+
subject.should be_empty
|
118
|
+
end
|
119
|
+
end
|
120
|
+
END
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'returns nil' do
|
124
|
+
should be_nil
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
describe '#have_matcher' do
|
130
|
+
subject { should_object.have_matcher }
|
131
|
+
|
132
|
+
context 'when it is taking #have matcher' do
|
133
|
+
let(:source) do
|
134
|
+
<<-END
|
135
|
+
describe 'example' do
|
136
|
+
it 'has 2 items' do
|
137
|
+
subject.should have(2).items
|
138
|
+
end
|
139
|
+
end
|
140
|
+
END
|
141
|
+
end
|
142
|
+
|
143
|
+
it 'returns an instance of Have' do
|
144
|
+
should be_an(Have)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
context 'when it is taking operator matcher' do
|
149
|
+
let(:source) do
|
150
|
+
<<-END
|
151
|
+
describe 'example' do
|
152
|
+
it 'is 1' do
|
153
|
+
subject.should == 1
|
154
|
+
end
|
155
|
+
end
|
156
|
+
END
|
157
|
+
end
|
158
|
+
|
159
|
+
it 'returns nil' do
|
160
|
+
should be_nil
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
context 'when it is taking any other non-operator matcher' do
|
165
|
+
let(:source) do
|
166
|
+
<<-END
|
167
|
+
describe 'example' do
|
168
|
+
it 'is empty' do
|
169
|
+
subject.should be_empty
|
170
|
+
end
|
171
|
+
end
|
172
|
+
END
|
173
|
+
end
|
174
|
+
|
175
|
+
it 'returns nil' do
|
176
|
+
should be_nil
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
91
181
|
describe '#expectize!' do
|
92
182
|
let(:source) do
|
93
183
|
<<-END
|
94
|
-
|
95
|
-
|
184
|
+
describe 'example' do
|
185
|
+
it 'is 1' do
|
186
|
+
subject.should == 1
|
187
|
+
end
|
96
188
|
end
|
97
189
|
END
|
98
190
|
end
|
99
191
|
|
100
|
-
it 'invokes
|
101
|
-
should_object.
|
192
|
+
it 'invokes OperatorMatcher#correct_operator!' do
|
193
|
+
should_object.operator_matcher.should_receive(:correct_operator!)
|
102
194
|
should_object.expectize!
|
103
195
|
end
|
104
196
|
|
105
197
|
context 'when it is `subject.should` form' do
|
106
198
|
let(:source) do
|
107
199
|
<<-END
|
108
|
-
|
109
|
-
|
200
|
+
describe 'example' do
|
201
|
+
it 'is 1' do
|
202
|
+
subject.should eq(1)
|
203
|
+
end
|
110
204
|
end
|
111
205
|
END
|
112
206
|
end
|
113
207
|
|
114
208
|
let(:expected_source) do
|
115
209
|
<<-END
|
116
|
-
|
117
|
-
|
210
|
+
describe 'example' do
|
211
|
+
it 'is 1' do
|
212
|
+
expect(subject).to eq(1)
|
213
|
+
end
|
118
214
|
end
|
119
215
|
END
|
120
216
|
end
|
@@ -129,21 +225,89 @@ module Transpec
|
|
129
225
|
record.original_syntax.should == 'obj.should'
|
130
226
|
record.converted_syntax.should == 'expect(obj).to'
|
131
227
|
end
|
228
|
+
|
229
|
+
context 'and #expect is not available in the context' do
|
230
|
+
context 'and the context is determinable statically' do
|
231
|
+
let(:source) do
|
232
|
+
<<-END
|
233
|
+
describe 'example' do
|
234
|
+
class TestRunner
|
235
|
+
def run
|
236
|
+
1.should == 1
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
it 'is 1' do
|
241
|
+
TestRunner.new.run
|
242
|
+
end
|
243
|
+
end
|
244
|
+
END
|
245
|
+
end
|
246
|
+
|
247
|
+
context 'with runtime information' do
|
248
|
+
include_context 'dynamic analysis objects'
|
249
|
+
|
250
|
+
it 'raises InvalidContextError' do
|
251
|
+
-> { should_object.expectize! }.should raise_error(InvalidContextError)
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
context 'without runtime information' do
|
256
|
+
it 'raises InvalidContextError' do
|
257
|
+
-> { should_object.expectize! }.should raise_error(InvalidContextError)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
context 'and the context is not determinable statically' do
|
263
|
+
let(:source) do
|
264
|
+
<<-END
|
265
|
+
def my_eval(&block)
|
266
|
+
Object.new.instance_eval(&block)
|
267
|
+
end
|
268
|
+
|
269
|
+
describe 'example' do
|
270
|
+
it 'responds to #foo' do
|
271
|
+
my_eval { 1.should == 1 }
|
272
|
+
end
|
273
|
+
end
|
274
|
+
END
|
275
|
+
end
|
276
|
+
|
277
|
+
context 'with runtime information' do
|
278
|
+
include_context 'dynamic analysis objects'
|
279
|
+
|
280
|
+
it 'raises InvalidContextError' do
|
281
|
+
-> { should_object.expectize! }.should raise_error(InvalidContextError)
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
context 'without runtime information' do
|
286
|
+
it 'does not raise InvalidContextError' do
|
287
|
+
-> { should_object.expectize! }.should_not raise_error
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
291
|
+
end
|
132
292
|
end
|
133
293
|
|
134
294
|
context 'when it is `subject.should_not` form' do
|
135
295
|
let(:source) do
|
136
296
|
<<-END
|
137
|
-
|
138
|
-
|
297
|
+
describe 'example' do
|
298
|
+
it 'is not 1' do
|
299
|
+
subject.should_not eq(1)
|
300
|
+
end
|
139
301
|
end
|
140
302
|
END
|
141
303
|
end
|
142
304
|
|
143
305
|
let(:expected_source) do
|
144
306
|
<<-END
|
145
|
-
|
146
|
-
|
307
|
+
describe 'example' do
|
308
|
+
it 'is not 1' do
|
309
|
+
expect(subject).not_to eq(1)
|
310
|
+
end
|
147
311
|
end
|
148
312
|
END
|
149
313
|
end
|
@@ -162,8 +326,10 @@ module Transpec
|
|
162
326
|
context 'and "to_not" is passed as negative form' do
|
163
327
|
let(:expected_source) do
|
164
328
|
<<-END
|
165
|
-
|
166
|
-
|
329
|
+
describe 'example' do
|
330
|
+
it 'is not 1' do
|
331
|
+
expect(subject).to_not eq(1)
|
332
|
+
end
|
167
333
|
end
|
168
334
|
END
|
169
335
|
end
|
@@ -184,16 +350,20 @@ module Transpec
|
|
184
350
|
context 'when it is `(subject).should` form' do
|
185
351
|
let(:source) do
|
186
352
|
<<-END
|
187
|
-
|
188
|
-
|
353
|
+
describe 'example' do
|
354
|
+
it 'is true' do
|
355
|
+
(1 == 1).should be_true
|
356
|
+
end
|
189
357
|
end
|
190
358
|
END
|
191
359
|
end
|
192
360
|
|
193
361
|
let(:expected_source) do
|
194
362
|
<<-END
|
195
|
-
|
196
|
-
|
363
|
+
describe 'example' do
|
364
|
+
it 'is true' do
|
365
|
+
expect(1 == 1).to be_true
|
366
|
+
end
|
197
367
|
end
|
198
368
|
END
|
199
369
|
end
|
@@ -207,16 +377,20 @@ module Transpec
|
|
207
377
|
context 'when it is `subject.should() == 1` form' do
|
208
378
|
let(:source) do
|
209
379
|
<<-END
|
210
|
-
|
211
|
-
|
380
|
+
describe 'example' do
|
381
|
+
it 'is 1' do
|
382
|
+
subject.should() == 1
|
383
|
+
end
|
212
384
|
end
|
213
385
|
END
|
214
386
|
end
|
215
387
|
|
216
388
|
let(:expected_source) do
|
217
389
|
<<-END
|
218
|
-
|
219
|
-
|
390
|
+
describe 'example' do
|
391
|
+
it 'is 1' do
|
392
|
+
expect(subject).to eq(1)
|
393
|
+
end
|
220
394
|
end
|
221
395
|
END
|
222
396
|
end
|
@@ -236,16 +410,20 @@ module Transpec
|
|
236
410
|
context "when it is `#{method} { ... }.should` form" do
|
237
411
|
let(:source) do
|
238
412
|
<<-END
|
239
|
-
|
240
|
-
|
413
|
+
describe 'example' do
|
414
|
+
it 'raises error' do
|
415
|
+
#{method} { fail }.should raise_error
|
416
|
+
end
|
241
417
|
end
|
242
418
|
END
|
243
419
|
end
|
244
420
|
|
245
421
|
let(:expected_source) do
|
246
422
|
<<-END
|
247
|
-
|
248
|
-
|
423
|
+
describe 'example' do
|
424
|
+
it 'raises error' do
|
425
|
+
expect { fail }.to raise_error
|
426
|
+
end
|
249
427
|
end
|
250
428
|
END
|
251
429
|
end
|
@@ -267,16 +445,20 @@ module Transpec
|
|
267
445
|
context "when it is `#{method} { ... }.should` form" do
|
268
446
|
let(:source) do
|
269
447
|
<<-END
|
270
|
-
|
271
|
-
|
448
|
+
describe 'example' do
|
449
|
+
it 'is 1' do
|
450
|
+
#{method} { fail }.should eq(1)
|
451
|
+
end
|
272
452
|
end
|
273
453
|
END
|
274
454
|
end
|
275
455
|
|
276
456
|
let(:expected_source) do
|
277
457
|
<<-END
|
278
|
-
|
279
|
-
|
458
|
+
describe 'example' do
|
459
|
+
it 'is 1' do
|
460
|
+
expect(#{method} { fail }).to eq(1)
|
461
|
+
end
|
280
462
|
end
|
281
463
|
END
|
282
464
|
end
|
@@ -291,16 +473,20 @@ module Transpec
|
|
291
473
|
context 'when it is `method { ... }.should` form but the subject value is not proc' do
|
292
474
|
let(:source) do
|
293
475
|
<<-END
|
294
|
-
|
295
|
-
|
476
|
+
describe 'example' do
|
477
|
+
it 'increments all elements' do
|
478
|
+
[1, 2].map { |i| i + 1 }.should eq([2, 3])
|
479
|
+
end
|
296
480
|
end
|
297
481
|
END
|
298
482
|
end
|
299
483
|
|
300
484
|
let(:expected_source) do
|
301
485
|
<<-END
|
302
|
-
|
303
|
-
|
486
|
+
describe 'example' do
|
487
|
+
it 'increments all elements' do
|
488
|
+
expect([1, 2].map { |i| i + 1 }).to eq([2, 3])
|
489
|
+
end
|
304
490
|
end
|
305
491
|
END
|
306
492
|
end
|
data/spec/transpec/util_spec.rb
CHANGED
@@ -9,17 +9,10 @@ module Transpec
|
|
9
9
|
include ::AST::Sexp
|
10
10
|
|
11
11
|
describe '#const_name' do
|
12
|
-
subject { Util.const_name(
|
13
|
-
|
14
|
-
let(:const_node) do
|
15
|
-
AST::Scanner.scan(ast) do |node|
|
16
|
-
return node if node.type == :const
|
17
|
-
end
|
18
|
-
fail 'No const node is found!'
|
19
|
-
end
|
12
|
+
subject { Util.const_name(ast) }
|
20
13
|
|
21
14
|
context 'when the passed node is not :const type' do
|
22
|
-
let(:
|
15
|
+
let(:ast) do
|
23
16
|
s(:lvasgn, :foo,
|
24
17
|
s(:int, 1))
|
25
18
|
end
|
data/tasks/lib/transpec_demo.rb
CHANGED
@@ -28,7 +28,7 @@ class TranspecDemo < TranspecTest
|
|
28
28
|
def run_demo(transpec_args = [])
|
29
29
|
in_project_dir do
|
30
30
|
with_clean_bundler_env do
|
31
|
-
sh File.join(Transpec.root, 'bin', 'transpec'), '--force', '--commit-message'
|
31
|
+
sh File.join(Transpec.root, 'bin', 'transpec'), '--force', '--generate-commit-message'
|
32
32
|
sh 'bundle exec rspec'
|
33
33
|
sh "git checkout --quiet -b #{DEMO_BRANCH}"
|
34
34
|
sh 'git commit --all --file .git/COMMIT_EDITMSG'
|
data/tasks/lib/transpec_test.rb
CHANGED
@@ -36,13 +36,9 @@ class TranspecTest
|
|
36
36
|
|
37
37
|
def run
|
38
38
|
require 'transpec'
|
39
|
-
|
40
39
|
puts " Testing on #{name} Project ".center(80, '=')
|
41
|
-
|
42
|
-
|
43
|
-
prepare_project
|
44
|
-
run_test(args)
|
45
|
-
end
|
40
|
+
prepare_project
|
41
|
+
run_test(%w(--force))
|
46
42
|
end
|
47
43
|
|
48
44
|
private
|
@@ -65,7 +61,7 @@ class TranspecTest
|
|
65
61
|
|
66
62
|
Dir.chdir(url) do
|
67
63
|
Dir.new('.').each do |entry|
|
68
|
-
next if ['.', '..', '
|
64
|
+
next if ['.', '..', 'tmp'].include?(entry)
|
69
65
|
FileUtils.cp_r(entry, project_dir)
|
70
66
|
end
|
71
67
|
end
|
@@ -144,5 +140,7 @@ class TranspecTest
|
|
144
140
|
def prepare_env
|
145
141
|
# Disable Coveralls.
|
146
142
|
ENV['CI'] = ENV['JENKINS_URL'] = ENV['COVERALLS_RUN_LOCALLY'] = nil
|
143
|
+
|
144
|
+
ENV['TRANSPEC_TEST'] = 'true'
|
147
145
|
end
|
148
146
|
end
|
data/tasks/test.rake
CHANGED
@@ -14,9 +14,13 @@ namespace :test do
|
|
14
14
|
tests = [
|
15
15
|
TranspecTest.new(File.expand_path('.'), nil, ['--quiet']),
|
16
16
|
TranspecTest.new('https://github.com/sferik/twitter.git', 'v4.1.0', bundler_args),
|
17
|
-
TranspecTest.new('https://github.com/yujinakayama/guard.git', 'transpec-test', bundler_args + %w(--without development)),
|
18
17
|
TranspecTest.new('https://github.com/yujinakayama/mail.git', 'transpec-test', bundler_args)
|
19
18
|
]
|
19
|
+
|
20
|
+
# Sometimes Guard fails with JRuby randomly.
|
21
|
+
unless RUBY_ENGINE == 'jruby'
|
22
|
+
tests << TranspecTest.new('https://github.com/yujinakayama/guard.git', 'transpec-test', bundler_args + %w(--without development))
|
23
|
+
end
|
20
24
|
# rubocop:enable LineLength
|
21
25
|
|
22
26
|
desc 'Test Transpec on all projects'
|
data/transpec.gemspec
CHANGED
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_runtime_dependency 'parser', '~> 2.0'
|
23
23
|
spec.add_runtime_dependency 'rspec', '~> 2.14'
|
24
|
+
spec.add_runtime_dependency 'bundler', '~> 1.3'
|
24
25
|
spec.add_runtime_dependency 'rainbow', '~> 1.1'
|
25
26
|
|
26
|
-
spec.add_development_dependency 'bundler', '~> 1.3'
|
27
27
|
spec.add_development_dependency 'rake', '~> 10.1'
|
28
28
|
spec.add_development_dependency 'simplecov', '~> 0.7'
|
29
29
|
spec.add_development_dependency 'rubocop', '~> 0.10'
|
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: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Nakayama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -39,33 +39,33 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.14'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rainbow
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
62
|
-
type: :
|
61
|
+
version: '1.1'
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,31 +188,42 @@ files:
|
|
188
188
|
- lib/transpec/ast/builder.rb
|
189
189
|
- lib/transpec/ast/node.rb
|
190
190
|
- lib/transpec/ast/scanner.rb
|
191
|
+
- lib/transpec/base_rewriter.rb
|
191
192
|
- lib/transpec/cli.rb
|
192
193
|
- lib/transpec/commit_message.rb
|
193
194
|
- lib/transpec/configuration.rb
|
194
|
-
- lib/transpec/
|
195
|
+
- lib/transpec/converter.rb
|
196
|
+
- lib/transpec/dynamic_analyzer.rb
|
197
|
+
- lib/transpec/dynamic_analyzer/rewriter.rb
|
198
|
+
- lib/transpec/dynamic_analyzer/runtime_data.rb
|
199
|
+
- lib/transpec/file_finder.rb
|
195
200
|
- lib/transpec/git.rb
|
201
|
+
- lib/transpec/option_parser.rb
|
196
202
|
- lib/transpec/record.rb
|
197
203
|
- lib/transpec/report.rb
|
198
|
-
- lib/transpec/
|
204
|
+
- lib/transpec/static_context_inspector.rb
|
199
205
|
- lib/transpec/syntax.rb
|
200
|
-
- lib/transpec/syntax/able_to_allow_no_message.rb
|
201
|
-
- lib/transpec/syntax/able_to_target_any_instance.rb
|
202
206
|
- lib/transpec/syntax/be_close.rb
|
203
207
|
- lib/transpec/syntax/double.rb
|
204
|
-
- lib/transpec/syntax/
|
205
|
-
- lib/transpec/syntax/
|
208
|
+
- lib/transpec/syntax/expect.rb
|
209
|
+
- lib/transpec/syntax/have.rb
|
206
210
|
- lib/transpec/syntax/method_stub.rb
|
211
|
+
- lib/transpec/syntax/mixin/allow_no_message.rb
|
212
|
+
- lib/transpec/syntax/mixin/any_instance.rb
|
213
|
+
- lib/transpec/syntax/mixin/expectizable.rb
|
214
|
+
- lib/transpec/syntax/mixin/have_matcher.rb
|
215
|
+
- lib/transpec/syntax/mixin/monkey_patch.rb
|
216
|
+
- lib/transpec/syntax/mixin/send.rb
|
217
|
+
- lib/transpec/syntax/operator_matcher.rb
|
207
218
|
- lib/transpec/syntax/raise_error.rb
|
208
219
|
- lib/transpec/syntax/rspec_configure.rb
|
209
|
-
- lib/transpec/syntax/send_node_syntax.rb
|
210
220
|
- lib/transpec/syntax/should.rb
|
211
221
|
- lib/transpec/syntax/should_receive.rb
|
212
222
|
- lib/transpec/util.rb
|
213
223
|
- lib/transpec/version.rb
|
214
224
|
- spec/.rubocop.yml
|
215
225
|
- spec/spec_helper.rb
|
226
|
+
- spec/support/cache_helper.rb
|
216
227
|
- spec/support/file_helper.rb
|
217
228
|
- spec/support/shared_context.rb
|
218
229
|
- spec/transpec/ast/node_spec.rb
|
@@ -220,15 +231,21 @@ files:
|
|
220
231
|
- spec/transpec/cli_spec.rb
|
221
232
|
- spec/transpec/commit_message_spec.rb
|
222
233
|
- spec/transpec/configuration_spec.rb
|
223
|
-
- spec/transpec/
|
234
|
+
- spec/transpec/converter_spec.rb
|
235
|
+
- spec/transpec/dynamic_analyzer/rewriter_spec.rb
|
236
|
+
- spec/transpec/dynamic_analyzer_spec.rb
|
237
|
+
- spec/transpec/file_finder_spec.rb
|
224
238
|
- spec/transpec/git_spec.rb
|
239
|
+
- spec/transpec/option_parser_spec.rb
|
225
240
|
- spec/transpec/record_spec.rb
|
226
241
|
- spec/transpec/report_spec.rb
|
227
|
-
- spec/transpec/
|
242
|
+
- spec/transpec/static_context_inspector_spec.rb
|
228
243
|
- spec/transpec/syntax/be_close_spec.rb
|
229
244
|
- spec/transpec/syntax/double_spec.rb
|
230
|
-
- spec/transpec/syntax/
|
245
|
+
- spec/transpec/syntax/expect_spec.rb
|
246
|
+
- spec/transpec/syntax/have_spec.rb
|
231
247
|
- spec/transpec/syntax/method_stub_spec.rb
|
248
|
+
- spec/transpec/syntax/operator_matcher_spec.rb
|
232
249
|
- spec/transpec/syntax/raise_error_spec.rb
|
233
250
|
- spec/transpec/syntax/rspec_configure_spec.rb
|
234
251
|
- spec/transpec/syntax/should_receive_spec.rb
|
@@ -268,6 +285,7 @@ summary: RSpec syntax converter
|
|
268
285
|
test_files:
|
269
286
|
- spec/.rubocop.yml
|
270
287
|
- spec/spec_helper.rb
|
288
|
+
- spec/support/cache_helper.rb
|
271
289
|
- spec/support/file_helper.rb
|
272
290
|
- spec/support/shared_context.rb
|
273
291
|
- spec/transpec/ast/node_spec.rb
|
@@ -275,15 +293,21 @@ test_files:
|
|
275
293
|
- spec/transpec/cli_spec.rb
|
276
294
|
- spec/transpec/commit_message_spec.rb
|
277
295
|
- spec/transpec/configuration_spec.rb
|
278
|
-
- spec/transpec/
|
296
|
+
- spec/transpec/converter_spec.rb
|
297
|
+
- spec/transpec/dynamic_analyzer/rewriter_spec.rb
|
298
|
+
- spec/transpec/dynamic_analyzer_spec.rb
|
299
|
+
- spec/transpec/file_finder_spec.rb
|
279
300
|
- spec/transpec/git_spec.rb
|
301
|
+
- spec/transpec/option_parser_spec.rb
|
280
302
|
- spec/transpec/record_spec.rb
|
281
303
|
- spec/transpec/report_spec.rb
|
282
|
-
- spec/transpec/
|
304
|
+
- spec/transpec/static_context_inspector_spec.rb
|
283
305
|
- spec/transpec/syntax/be_close_spec.rb
|
284
306
|
- spec/transpec/syntax/double_spec.rb
|
285
|
-
- spec/transpec/syntax/
|
307
|
+
- spec/transpec/syntax/expect_spec.rb
|
308
|
+
- spec/transpec/syntax/have_spec.rb
|
286
309
|
- spec/transpec/syntax/method_stub_spec.rb
|
310
|
+
- spec/transpec/syntax/operator_matcher_spec.rb
|
287
311
|
- spec/transpec/syntax/raise_error_spec.rb
|
288
312
|
- spec/transpec/syntax/rspec_configure_spec.rb
|
289
313
|
- spec/transpec/syntax/should_receive_spec.rb
|