Sha256: d89ef5d9aa0c0fd3b187534a9153c2b6fde7627ae6e577ab95c2c6c5ff5ecb5d

Contents?: true

Size: 1.36 KB

Versions: 22

Compression:

Stored size: 1.36 KB

Contents

require 'test_helper'

class ConfigTest < Test::Unit::TestCase

  def setup
    @config = Hatchet::Config.new
  end

  def test_config_path_for_name
    assert_equal 'test/fixtures/repos/rails3/rails3_mri_193', @config.path_for_name('rails3_mri_193')
  end

  def test_config_dirs
    expected_dirs = { "test/fixtures/repos/rails3/rails3_mri_193" => "git://github.com/sharpstone/rails3_mri_193.git",
                      "test/fixtures/repos/rails2/rails2blog"     => "git://github.com/sharpstone/rails2blog.git",
                      "test/fixtures/repos/bundler/no_lockfile"   => "git://github.com/sharpstone/no_lockfile.git" }
    assert_equal expected_dirs, @config.dirs
  end

  def test_config_repos
    expected_repos = { "rails3_mri_193" => "test/fixtures/repos/rails3/rails3_mri_193",
                       "rails2blog"     => "test/fixtures/repos/rails2/rails2blog",
                       "no_lockfile"    => "test/fixtures/repos/bundler/no_lockfile"}
    assert_equal expected_repos, @config.repos
  end

  def test_no_internal_config_raises_no_errors
    # assert no_raise
    @config.send :set_internal_config!, {}
    assert_equal './repos', @config.repo_directory_path
  end

  def test_github_shortcuts
    @config.send :init_config!, {"foo" => ["schneems/sextant"]}
    assert_equal("git://github.com/schneems/sextant.git", @config.dirs["./repos/foo/sextant"])
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
heroku_hatchet-1.3.7 test/hatchet/config_test.rb
heroku_hatchet-1.3.6 test/hatchet/config_test.rb
heroku_hatchet-1.3.5 test/hatchet/config_test.rb
heroku_hatchet-1.3.4 test/hatchet/config_test.rb
heroku_hatchet-1.3.3 test/hatchet/config_test.rb
heroku_hatchet-1.3.2 test/hatchet/config_test.rb
heroku_hatchet-1.3.1 test/hatchet/config_test.rb
heroku_hatchet-1.3.0 test/hatchet/config_test.rb
heroku_hatchet-1.2.1 test/hatchet/config_test.rb
heroku_hatchet-1.2.0 test/hatchet/config_test.rb
heroku_hatchet-1.1.9 test/hatchet/config_test.rb
heroku_hatchet-1.1.8 test/hatchet/config_test.rb
heroku_hatchet-1.1.7 test/hatchet/config_test.rb
heroku_hatchet-1.1.6 test/hatchet/config_test.rb
heroku_hatchet-1.1.5 test/hatchet/config_test.rb
heroku_hatchet-1.1.4 test/hatchet/config_test.rb
heroku_hatchet-1.1.3 test/hatchet/config_test.rb
heroku_hatchet-1.1.2 test/hatchet/config_test.rb
heroku_hatchet-1.1.1 test/hatchet/config_test.rb
heroku_hatchet-1.1.0 test/hatchet/config_test.rb