Sha256: 60a8a013a9ec3899097d64a621338d588815de5b14fd3dfa98d954e783aea105
Contents?: true
Size: 806 Bytes
Versions: 20
Compression:
Stored size: 806 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() {\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
20 entries across 20 versions & 1 rubygems