Sha256: b55103ecaf673dbf4baf643aca8a4287446a37e05506fe832ba1c37c8ee2cfd8
Contents?: true
Size: 1.97 KB
Versions: 5
Compression:
Stored size: 1.97 KB
Contents
$:.unshift File.join(File.dirname(__FILE__), "..", "..", "lib") require 'test/unit' require 'buildmaster' module BuildMaster class SvnDriverTest < Test::Unit::TestCase protected def setup super @path = File.join(File.dirname(__FILE__), "..", "..") @info = SvnInfo.new @path end public def test_load_info info = SvnInfo.new(@path) assert_equal(@path, info.path) assert_equal('svn+ssh://wolfdancer@rubyforge.org/var/svn/buildmaster', info.repository_root) end def test_load_driver svn = SvnDriver.from_path(@path) svn.command('info') end def test_status log = '' svn = SvnDriver.new(@info){|command| log = command} svn.status assert_equal("svn status #{@path}", log) end def test_update log = '' svn = SvnDriver.new(@info) {|command| log = command} svn.update assert_equal("svn update #{@path}", log) end def test_commit log = '' svn = SvnDriver.new(@info) {|command| log = command} svn.commit('message') assert_equal("svn commit #{@path} -m \"message\"", log) end def test_checkout log = '' svn = SvnDriver.new(@info) {|command| log = command} svn.checkout('output') assert_equal("svn checkout #{@info.repository_root}/trunk output", log) end def test_command log = '' svn = SvnDriver.new(@info) {|command| log = command} svn.command('info') assert_equal("svn info #{@path}", log) end def test_tag log = '' svn = SvnDriver.new(@info) {|command| log = command} tag = 'build_0.0.5_b3' svn.tag(tag) assert_equal( "svn copy #{@info.repository_root}/trunk #{@info.repository_root}/tags/#{tag} -m \"ruby buildmaster\"", log) end end end
Version data entries
5 entries across 5 versions & 1 rubygems