Sha256: 0866565451a3c360616f1ce7deca7e60904f13ee1a37e32a40de8c03e163780f
Contents?: true
Size: 989 Bytes
Versions: 12
Compression:
Stored size: 989 Bytes
Contents
require File.expand_path(__FILE__).sub(%r(/test/.*), '/test/test_helper.rb') require File.expand_path(__FILE__).sub(%r(.*/test/), '').sub(/test_(.*)\.rb/,'\1') class TestSync < Test::Unit::TestCase def test_sync TmpFile.with_path do |tmpdir| tmpdir = Scout.tmp.tmpdir_sync tmpdir.dir1.foo.write("FOO") tmpdir.dir1.bar.write("BAR") TmpFile.with_path do |tmpdir2| Misc.in_dir tmpdir2 do SSHLine.sync([tmpdir.dir1], map: :current) assert tmpdir2.glob("**/*").select{|f| f.include?('foo') }.any? end end end end def test_sync_dir_map TmpFile.with_path do |tmpdir| tmpdir = Scout.tmp.tmpdir_sync tmpdir.dir1.foo.write("FOO") tmpdir.dir1.bar.write("BAR") TmpFile.with_path do |tmpdir2| SSHLine.sync([tmpdir.dir1], map: tmpdir2) Misc.in_dir tmpdir2 do assert tmpdir2.glob("**/*").select{|f| f.include?('foo') }.any? end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems