Sha256: 58717b758a3f805e95b996f7d9639b328980d15a202cfd27bb81b286bb84e607
Contents?: true
Size: 815 Bytes
Versions: 1
Compression:
Stored size: 815 Bytes
Contents
require 'spec_helper' RSpec.describe ProxyPacCompressor do subject(:proxy_pac) { instance_double('ProxyPac::ProxyPacFile') } let(:compressor) { described_class.new } let(:modified_content) { %(function FindProxyForURL(url, host) {\n return \"DIRECT\";\n}) } let(:content) do <<-EOS.strip_heredoc.chomp // comment function FindProxyForURL(url, host) { return "DIRECT"; } EOS end before :each do allow(proxy_pac).to receive(:content).and_return(content) allow(proxy_pac).to receive(:type?).with(:string).and_return(true) end before :each do expect(proxy_pac).to receive(:content=).with(modified_content) end describe '#modify' do context 'when string contains white paces' do it { compressor.compress(proxy_pac) } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
proxy_pac_rb-0.9.1 | spec/api/proxy_pac_compressor_spec.rb |