File: repo_ignore_test.rb

package info (click to toggle)
ruby-rugged 1.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,752 kB
  • sloc: ansic: 8,722; ruby: 7,473; sh: 99; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require "test_helper"

class RepositoryIgnoreTest < Rugged::TestCase
  def setup
    @repo = FixtureRepo.from_libgit2 "attr"
  end

  def test_path_ignored
    assert @repo.path_ignored?("ign")
    refute @repo.path_ignored?("ignore_not")
    assert @repo.path_ignored?("dir")
    assert @repo.path_ignored?("dir/foo")
    assert @repo.path_ignored?("dir/foo/bar")
    refute @repo.path_ignored?("foo/dir")
    assert @repo.path_ignored?("foo/dir/bar")
    refute @repo.path_ignored?("direction")
  end
end