Sha256: ea788d58774dfbef6d147f0c2cf26a4f91cd18f7d923fddcf1a50d38a2fe5d4f

Contents?: true

Size: 818 Bytes

Versions: 30

Compression:

Stored size: 818 Bytes

Contents

require 'fileutils'

module RSCM
  module GenericSCMTests
    include FileUtils

    def test_apply_label
      work_dir = new_temp_dir
      checkout_dir = "#{work_dir}/checkout"
      repository_dir = "#{work_dir}/repository"
      scm = create_scm(repository_dir, "damagecontrolled")
      scm.create

      import_damagecontrolled(scm, "#{work_dir}/damagecontrolled")
      scm.checkout(checkout_dir)

      add_or_edit_and_commit_file(scm, checkout_dir, "before.txt", "Before label")
      scm.apply_label(checkout_dir, "MY_LABEL")
      add_or_edit_and_commit_file(scm, checkout_dir, "after.txt", "After label")
      scm.checkout(checkout_dir, "MY_LABEL")
      assert(File.exist?("#{checkout_dir}/before.txt"))
      assert(!File.exist?("#{checkout_dir}/after.txt"))
    end

  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rscm-0.1.0.1338 test/rscm/apply_label_scm_tests.rb
rscm-0.1.0.999 test/rscm/apply_label_scm_tests.rb
rscm-0.1.0.1337 test/rscm/apply_label_scm_tests.rb
rscm-0.3.10 test/rscm/apply_label_scm_tests.rb
rscm-0.3.11 test/rscm/apply_label_scm_tests.rb
rscm-0.3.13 test/rscm/apply_label_scm_tests.rb
rscm-0.3.3 test/rscm/apply_label_scm_tests.rb
rscm-0.3.4 test/rscm/apply_label_scm_tests.rb
rscm-0.2.0 test/rscm/apply_label_scm_tests.rb
rscm-0.3.12 test/rscm/apply_label_scm_tests.rb
rscm-0.3.2 test/rscm/apply_label_scm_tests.rb
rscm-0.3.16 test/rscm/apply_label_scm_tests.rb
rscm-0.3.5 test/rscm/apply_label_scm_tests.rb
rscm-0.3.15 test/rscm/apply_label_scm_tests.rb
rscm-0.3.1 test/rscm/apply_label_scm_tests.rb
rscm-0.1.0 test/rscm/apply_label_scm_tests.rb
rscm-0.3.14 test/rscm/apply_label_scm_tests.rb
rscm-0.2.1.1404 test/rscm/apply_label_scm_tests.rb
rscm-0.3.0 test/rscm/apply_label_scm_tests.rb
rscm-0.4.3 test/rscm/apply_label_scm_tests.rb