Sha256: 2b3d1109b49fd85e19b7ec338e0094caf516a42f6717f3973a6f1efb1de5ef78
Contents?: true
Size: 1.06 KB
Versions: 20
Compression:
Stored size: 1.06 KB
Contents
require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) # The proxy helper defines proxy settings that can be used with sc-server describe SC::Buildfile::Commands, 'proxy' do it "should save the opts for a new proxy" do b = SC::Buildfile.define do proxy '/url', :foo => :bar end b.proxies['/url'].foo.should eql(:bar) end it "should save the REPLACE opts for multiple calls to proxy" do b = SC::Buildfile.define do proxy '/url', :test1 => :foo, :test2 => :foo proxy '/url', :test1 => :bar end b.proxies['/url'].test1.should eql(:bar) b.proxies['/url'].test2.should be_nil end it "should merge multiple proxy urls and REPLACE opts for chained files" do a = SC::Buildfile.define do proxy '/url1', :test1 => :foo, :test2 => :foo proxy '/url2', :test1 => :foo end b = a.dup.define! do proxy '/url1', :test1 => :bar end b.proxies['/url1'].test1.should eql(:bar) b.proxies['/url1'].test2.should be_nil b.proxies['/url2'].test1.should eql(:foo) end end
Version data entries
20 entries across 20 versions & 2 rubygems