diff options
| author | teddywing | 2017-08-01 17:39:10 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-01 17:39:10 +0200 |
| commit | 1f09ead58c9c603e9d767781ceb82859b2393f49 (patch) | |
| tree | aec7d66e003ef9768156976750e27c38fd22cc0a /spec/services/file_service_spec.rb | |
| parent | 60ae8866d6d4c55bc064a2a83c1a1ffa87894202 (diff) | |
| parent | ee75bd1e579ab366eb6cac938f50e7786536472b (diff) | |
| download | chouette-core-1f09ead58c9c603e9d767781ceb82859b2393f49.tar.bz2 | |
Merge pull request #46 from af83/3507_1726_impl_workbench_import
3507 1726 impl workbench import
Diffstat (limited to 'spec/services/file_service_spec.rb')
| -rw-r--r-- | spec/services/file_service_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/services/file_service_spec.rb b/spec/services/file_service_spec.rb new file mode 100644 index 000000000..4426ee145 --- /dev/null +++ b/spec/services/file_service_spec.rb @@ -0,0 +1,17 @@ +# TODO: Delete me after stable implementation of #1726 +# RSpec.describe FileService do + +# it 'computes a unique filename' do +# expect( File ).to receive(:exists?).with('xxx/yyy_0').and_return( false ) + +# expect(described_class.unique_filename('xxx/yyy')).to eq('xxx/yyy_0') +# end + +# it 'handles duplicate names by means of a counter' do +# expect( File ).to receive(:exists?).with('xxx/yyy_0').and_return( true ) +# expect( File ).to receive(:exists?).with('xxx/yyy_1').and_return( true ) +# expect( File ).to receive(:exists?).with('xxx/yyy_2').and_return( false ) + +# expect(described_class.unique_filename('xxx/yyy')).to eq('xxx/yyy_2') +# end +# end |
