synvert-core 1.8.0 → 1.8.1
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 +4 -0
- data/Gemfile.lock +1 -1
- data/lib/synvert/core/rewriter/instance.rb +1 -1
- data/lib/synvert/core/version.rb +1 -1
- data/spec/synvert/core/rewriter/instance_spec.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6007d28c9a4371057b72bfbd4e73c23163cf52c384e7cef0a3fcdcd71b384fcd
|
4
|
+
data.tar.gz: 5b43685d36948aaf52dd313fdf0e6198eefa73ff12813853d1f289577f58da07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc762494a28bc325231e1903130fbd14056442646b463b2e336426e59830f2ee8216fb6caa29c50960fed82a75bc320d4196919b0bffb9ab2547674f19bc89ac
|
7
|
+
data.tar.gz: 60e6b882a9b039c42acecb27581fca198482eeef15628ac9123daf4e08dd0bc109ebff3a1e5c2c7ac62ad8fd4fc7e6fdf65871d83b98a3a90c32b71702ff4057
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -41,7 +41,7 @@ module Synvert::Core
|
|
41
41
|
# It finds specified files, for each file, it executes the block code, tests the original code,
|
42
42
|
# then returns the actions.
|
43
43
|
def test
|
44
|
-
get_file_paths.
|
44
|
+
get_file_paths.map do |file_path|
|
45
45
|
test_file(file_path)
|
46
46
|
end
|
47
47
|
end
|
data/lib/synvert/core/version.rb
CHANGED
@@ -205,7 +205,7 @@ module Synvert::Core
|
|
205
205
|
assert post.valid?
|
206
206
|
end
|
207
207
|
EOS
|
208
|
-
expect(Dir).to receive(:glob).with('
|
208
|
+
expect(Dir).to receive(:glob).with('spec/**/*_spec.rb').and_return(['spec/models/post_spec.rb'])
|
209
209
|
expect(File).to receive(:read).with('spec/models/post_spec.rb', encoding: 'UTF-8').and_return(input)
|
210
210
|
expect(File).to receive(:write).with('spec/models/post_spec.rb', output)
|
211
211
|
instance.process
|
@@ -230,7 +230,7 @@ module Synvert::Core
|
|
230
230
|
config.include FactoryGirl::Syntax::Methods
|
231
231
|
end
|
232
232
|
EOS
|
233
|
-
expect(Dir).to receive(:glob).with('
|
233
|
+
expect(Dir).to receive(:glob).with('spec/spec_helper.rb').and_return(['spec/spec_helper.rb'])
|
234
234
|
expect(File).to receive(:read).with('spec/spec_helper.rb', encoding: 'UTF-8').and_return(input)
|
235
235
|
expect(File).not_to receive(:write).with('spec/spec_helper.rb', output)
|
236
236
|
instance.process
|
@@ -257,7 +257,7 @@ module Synvert::Core
|
|
257
257
|
assert post.valid?
|
258
258
|
end
|
259
259
|
EOS
|
260
|
-
expect(Dir).to receive(:glob).with('
|
260
|
+
expect(Dir).to receive(:glob).with('spec/**/*_spec.rb').and_return(['spec/models/post_spec.rb']).twice
|
261
261
|
expect(File).to receive(:read).with('spec/models/post_spec.rb', encoding: 'UTF-8').and_return(input)
|
262
262
|
expect(File).to receive(:write).with('spec/models/post_spec.rb', output)
|
263
263
|
expect(File).to receive(:read).with('spec/models/post_spec.rb', encoding: 'UTF-8').and_return(output)
|
@@ -284,7 +284,7 @@ module Synvert::Core
|
|
284
284
|
assert post.valid?
|
285
285
|
end
|
286
286
|
EOS
|
287
|
-
expect(Dir).to receive(:glob).with('
|
287
|
+
expect(Dir).to receive(:glob).with('spec/**/*_spec.rb').and_return(['spec/models/post_spec.rb'])
|
288
288
|
expect(File).to receive(:read).with('spec/models/post_spec.rb', encoding: 'UTF-8').and_return(input)
|
289
289
|
results = instance.test
|
290
290
|
expect(results[0].file_path).to eq 'spec/models/post_spec.rb'
|
@@ -308,7 +308,7 @@ module Synvert::Core
|
|
308
308
|
config.include FactoryGirl::Syntax::Methods
|
309
309
|
end
|
310
310
|
EOS
|
311
|
-
expect(Dir).to receive(:glob).with('
|
311
|
+
expect(Dir).to receive(:glob).with('spec/spec_helper.rb').and_return(['spec/spec_helper.rb'])
|
312
312
|
expect(File).to receive(:read).with('spec/spec_helper.rb', encoding: 'UTF-8').and_return(input)
|
313
313
|
result = instance.test
|
314
314
|
expect(result[0].file_path).to eq 'spec/spec_helper.rb'
|