Sha256: 71838968ab728cd03bec02f9a2f5fa2261dd38d9ae468a193dc98cb84acbba55
Contents?: true
Size: 776 Bytes
Versions: 4
Compression:
Stored size: 776 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(){return"DIRECT"}) } let(:content) do <<-EOS.strip_heredoc.chomp 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
4 entries across 4 versions & 1 rubygems