Sha256: 3d0af6535bdf05e041dd03615e67c8b08ba8ced3c3852f1eb5e72cbb0d173974

Contents?: true

Size: 1.28 KB

Versions: 22

Compression:

Stored size: 1.28 KB

Contents

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

module RSCM
  class StarTeamTest < Test::Unit::TestCase
#    include GenericSCMTests

    def create_scm(repository_root_dir, path)
      StarTeam.new(ENV["STARTEAM_USER"], ENV["STARTEAM_PASS"], "192.168.254.21", 49201, "NGST Application", "NGST Application", "java")
    end

    def test_revisions
      from = Time.new - 2 * 3600 * 24
      to = Time.new - 1 * 3600 * 24
      puts "Getting revisions for #{from} - #{to}"
    
      revisions = create_scm(nil, nil).revisions(nil, from, to)
      assert_equal(1, revisions.length)
      assert_equal(Time.utc(2004, 11, 30, 04, 52, 24), revisions[0][0].time)
      assert_equal(Time.utc(2004, 11, 30, 04, 53, 23), revisions[0][1].time)
      assert_equal(Time.utc(2004, 11, 30, 04, 53, 23), revisions[0].time)
      assert_equal("rinkrank", revisions[0].developer)
      assert_equal("En to\ntre buksa \nned\n", revisions[0].message)
    end

    def test_checkout
      files = create_scm(nil, nil).checkout("target/starteam/checkout")
      assert_equal(3, files.length)
      assert_equal("eenie/meenie/minee/mo", files[0])
      assert_equal("catch/a/redneck/by", files[1])
      assert_equal("the/toe", files[2])
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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