Sha256: f654f8d65903a71a6e1b771b330240ad3ce09e0a8a194dae17f26cf6189cddb0

Contents?: true

Size: 572 Bytes

Versions: 5

Compression:

Stored size: 572 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe PacManager do
  context '#find' do
    it 'finds the file in given path' do
      directory = create_directory 'pac_files'
      file_path = create_file 'pac_files/file1.pac'
      create_file 'pac_files/file2.pac'

      manager = PacManager.new(directory)
      file = manager.find('file1')
      expect(file.path).to eq(file_path)
    end

    it 'returs a null object if cannot be found' do
      manager = PacManager.new('/tmp')
      file = manager.find('file1')
      expect(file.nil?).to be_true
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
local_pac-0.0.5 spec/pac_manager_spec.rb
local_pac-0.0.4 spec/pac_manager_spec.rb
local_pac-0.0.3 spec/pac_manager_spec.rb
local_pac-0.0.2 spec/pac_manager_spec.rb
local_pac-0.0.1 spec/pac_manager_spec.rb