Sha256: 74652b9bf92326a6e8f85e4d2541cc081e328411a2895b50f9c1509d66980b89
Contents?: true
Size: 1010 Bytes
Versions: 10
Compression:
Stored size: 1010 Bytes
Contents
require 'spec_helper' require 'proxy_pac_rb/rspec' RSpec.describe 'Validity', type: :proxy_pac do subject do <<-EOS.strip_heredoc.chomp function FindProxyForURL(url, host) { return "DIRECT"; } EOS end context 'when is valid' do it { expect(proxy_pac).to be_valid } end context 'when is not valid' do context 'when is not readable' do subject { 'function Gargabe' } it { expect(proxy_pac).not_to be_valid } end context 'when contains gargabe' do subject do <<-EOS.strip_heredoc.chomp function FindProxyForURL(url, host) { return $ยง"% "DIRECT"; } EOS end it { expect(proxy_pac).not_to be_valid } end context 'when undefined variable is referenced' do subject do <<-EOS.strip_heredoc.chomp function FindProxyForURL(url, host) { return asdf; } EOS end it { expect(proxy_pac).not_to be_valid } end end end
Version data entries
10 entries across 10 versions & 1 rubygems