Sha256: 6319d76f07460e53fa343fbd7fdb0b2f01442b32a8fb311a8989c75132a2095f

Contents?: true

Size: 710 Bytes

Versions: 25

Compression:

Stored size: 710 Bytes

Contents

#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../test_helper'

class TestConfig < Test::Unit::TestCase
  def setup
    set_file_paths
    @git = Git.open(@wdir)
  end
  
  def test_config
    c = @git.config
    assert_equal('Scott Chacon', c['user.name'])
    assert_equal('false', c['core.bare'])
  end
  
  def test_read_config
    assert_equal('Scott Chacon', @git.config('user.name'))
    assert_equal('false', @git.config('core.bare'))
  end
  
  def test_set_config
    in_temp_dir do |path|
      g = Git.clone(@wbare, 'bare')
      assert_not_equal('bully', g.config('user.name'))
      g.config('user.name', 'bully')
      assert_equal('bully', g.config('user.name'))
    end
  end  
  
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
titanous-git-1.1.0 tests/units/test_config.rb
redcar-dev-0.12.1dev-java plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-dev-0.12.0dev-java plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.11 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.11.0dev plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.10 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.9.2 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.9.1 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.9.0 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.8.1 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.8 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.7 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.6.1 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.6 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.6.1dev plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.5.1 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.5 plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.5.6dev plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.5.5dev plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb
redcar-0.5.4dev plugins/scm_git/vendor/ruby-git/tests/units/test_config.rb