Sha256: d4d10c614e560884d9f4faf8df7823e823324a45cf9c982d0c0c85090d1cecfb

Contents?: true

Size: 619 Bytes

Versions: 3

Compression:

Stored size: 619 Bytes

Contents

# encoding: utf-8

require "spec_helper"

module Bunch
  describe Ignorer do
    let(:input_tree) do
      FileTree.from_hash(
        "a" => {"b" => "bb", "c" => "cc", ".DS_Store" => "asfd" }
      )
    end

    it "ignores .DS_Store files" do
      result = Ignorer.new(input_tree).result
      result.to_hash.must_equal("a" => { "b" => "bb", "c" => "cc" })
    end

    it "ignores other patterns" do
      pattern = /b/
      Ignorer::PATTERNS << pattern
      result = Ignorer.new(input_tree).result
      result.to_hash.must_equal("a" => { "c" => "cc" })
      Ignorer::PATTERNS.delete pattern
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bunch-1.0.0pre3 spec/bunch/ignorer_spec.rb
bunch-1.0.0pre2 spec/bunch/ignorer_spec.rb
bunch-1.0.0pre1 spec/bunch/ignorer_spec.rb