Sha256: cbe92cc94fde72ceda48e9bd90e0117d50ab4a3ab170e5659dd02f117c810acd

Contents?: true

Size: 724 Bytes

Versions: 6

Compression:

Stored size: 724 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe PacFile do
  context '#path' do
    it 'has a path' do
      file = PacFile.new('/usr/share/file1.pac')
      expect(file.path).to eq('/usr/share/file1.pac')
    end
  end

  context '#name' do
    it 'has a name' do
      file = PacFile.new('/usr/share/file1.pac')
      expect(file.name).to eq(:file1)
    end
  end

  context '#content' do
    it 'returns the content of file' do
      file = create_file('file1.pac', 'content')
      file = PacFile.new(file)
      expect(file.content).to eq('content')
    end
  end

  context '#nil?' do
    it 'is always false' do
      file = PacFile.new('/usr/share/file1.pac')
      expect(file.nil?).to be_false
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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