Sha256: 4a9fd2aa2a04b17bd33b2ec3099a357986b31f79a8d4d2dfdcd516a3bb7e71d7

Contents?: true

Size: 966 Bytes

Versions: 20

Compression:

Stored size: 966 Bytes

Contents

require 'test/unit'
require 'rscm'
require 'rscm/generic_scm_tests'

module RSCM
  class PerforceTest < Test::Unit::TestCase
    include GenericSCMTests

    def create_scm(repository_root_dir, path = nil)
      p4 = Perforce.new
      p4.repository_root_dir = repository_root_dir
      p4
    end

    def test_shuld_create_new_client_only_if_it_does_not_already_exist
      work_dir = RSCM.new_temp_dir("use_existing_client")
      checkout_dir = "#{work_dir}/WorkingCopy"
      repository_dir = "#{work_dir}/repository"
      name = "client-one"

      scm = create_scm(repository_dir)
      scm.client_name = name
      scm.checkout_dir = checkout_dir

      scm.create_central
      @scm = scm
      import_damagecontrolled(scm, "#{work_dir}/damagecontrolled")
      assert(!scm.uptodate?(nil))

      other = create_scm(repository_dir)
      other.client_name = name
      other.checkout_dir = checkout_dir
      assert(!other.uptodate?(nil))
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rscm-0.3.10 test/rscm/scm/perforce_test.rb
rscm-0.3.12 test/rscm/scm/perforce_test.rb
rscm-0.3.14 test/rscm/scm/perforce_test.rb
rscm-0.3.5 test/rscm/scm/perforce_test.rb
rscm-0.3.11 test/rscm/scm/perforce_test.rb
rscm-0.3.13 test/rscm/scm/perforce_test.rb
rscm-0.3.16 test/rscm/scm/perforce_test.rb
rscm-0.3.0 test/rscm/scm/perforce_test.rb
rscm-0.3.4 test/rscm/scm/perforce_test.rb
rscm-0.3.2 test/rscm/scm/perforce_test.rb
rscm-0.3.3 test/rscm/scm/perforce_test.rb
rscm-0.3.15 test/rscm/scm/perforce_test.rb
rscm-0.3.1 test/rscm/scm/perforce_test.rb
rscm-0.4.3 test/rscm/scm/perforce_test.rb
rscm-0.3.6 test/rscm/scm/perforce_test.rb
rscm-0.3.7 test/rscm/scm/perforce_test.rb
rscm-0.4.0 test/rscm/scm/perforce_test.rb
rscm-0.3.8 test/rscm/scm/perforce_test.rb
rscm-0.3.9 test/rscm/scm/perforce_test.rb
rscm-0.4.2 test/rscm/scm/perforce_test.rb