aboutsummaryrefslogtreecommitdiffstats
path: root/switchtower/test/scm/cvs_test.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-08-24 15:15:23 +0000
committerJamis Buck <jamis@37signals.com>2005-08-24 15:15:23 +0000
commitaffb615a8a5da2d41383741fd51871261550925e (patch)
treef390067921b08b5609ee1b7bd2e0318e6369331a /switchtower/test/scm/cvs_test.rb
parent6a4d4460ea2569d3bb54e1e75fad945c361cbc9b (diff)
downloadrails-affb615a8a5da2d41383741fd51871261550925e.tar.gz
rails-affb615a8a5da2d41383741fd51871261550925e.tar.bz2
rails-affb615a8a5da2d41383741fd51871261550925e.zip
SwitchTower: use a timestamp as the release name, instead of the revision number. Various tweaks and fixes to the supported scm modules.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2046 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'switchtower/test/scm/cvs_test.rb')
-rw-r--r--switchtower/test/scm/cvs_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/switchtower/test/scm/cvs_test.rb b/switchtower/test/scm/cvs_test.rb
index 3df64cce0e..4532870826 100644
--- a/switchtower/test/scm/cvs_test.rb
+++ b/switchtower/test/scm/cvs_test.rb
@@ -44,6 +44,10 @@ class ScmCvsTest < Test::Unit::TestCase
story.each { |stream, line| yield @channels.last, stream, line }
end
+ def release_path
+ (@config[:now] || Time.now.utc).strftime("%Y%m%d%H%M%S")
+ end
+
def method_missing(sym, *args)
@config.send(sym, *args)
end
@@ -55,6 +59,7 @@ class ScmCvsTest < Test::Unit::TestCase
@config[:local] = "/hello/world"
@config[:cvs] = "/path/to/cvs"
@config[:password] = "chocolatebrownies"
+ @config[:now] = Time.utc(2005,8,24,12,0,0)
@scm = CvsTest.new(@config)
@actor = MockActor.new(@config)
@log_msg = <<MSG.strip
@@ -140,7 +145,7 @@ MSG
def test_latest_revision
@scm.story = [ @log_msg ]
- assert_equal "2004-10-12T02:21:02", @scm.latest_revision
+ assert_equal "2004-10-12 02:21:02", @scm.latest_revision
assert_equal "/hello/world", @scm.last_path
end