Sha256: b8f2525ad15036fd59da918817920d9718971a59515ee2ccdb1688dcbaf0ccdb
Contents?: true
Size: 965 Bytes
Versions: 1
Compression:
Stored size: 965 Bytes
Contents
require File.expand_path('../test_helper', __FILE__) describe 'gitdocs runner' do it 'should clone files' do with_clones(3) do |clone1, clone2, clone3| File.open(File.join(clone1, 'test'), 'w') { |f| f << 'testing' } sleep 3 assert_equal 'testing', File.read(File.join(clone1, 'test')) assert_equal 'testing', File.read(File.join(clone2, 'test')) assert_equal 'testing', File.read(File.join(clone3, 'test')) end end it 'should resolve conflicts files' do with_clones(3) do |clone1, clone2, clone3| File.open(File.join(clone1, 'test.txt'), 'w') { |f| f << 'testing' } sleep 3 File.open(File.join(clone1, 'test.txt'), 'w') { |f| f << "testing\n1" } File.open(File.join(clone2, 'test.txt'), 'w') { |f| f << "testing\n2" } sleep 3 assert_includes 2..3, Dir[File.join(clone2, '*.txt')].to_a.size assert_includes 2..3, Dir[File.join(clone3, '*.txt')].to_a.size end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gitdocs-0.5.0.pre1 | test/runner_test.rb |