Sha256: 90fc23bddc1c7a1d84b661504273cbae5fd4b9c004c76317612bc64912cfd508
Contents?: true
Size: 945 Bytes
Versions: 19
Compression:
Stored size: 945 Bytes
Contents
require 'spec_helper' describe PacFileValidator do context '#valid?' do let(:valid_pac_file) do <<-EOS.strip_heredoc function FindProxyForURL(url, host) { return "DIRECT" } EOS end let(:invalid_pac_file) do <<-EOS.strip_heredoc function FindProxyForURL(url, host) { EOS end it 'returns true if file is valid' do file = double('PacFile') expect(file).to receive(:content).and_return(valid_pac_file) validator = PacFileValidator.new expect(validator.valid?(file)).to be_true end it 'returns true if file is invalid' do file = double('PacFile') expect(file).to receive(:content).and_return(invalid_pac_file) validator = PacFileValidator.new expect(validator.valid?(file)).to be_false end end end
Version data entries
19 entries across 19 versions & 1 rubygems