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

Version Path
sproutit-sproutcore-1.0.0.20090407205609 spec/lib/buildfile_commands/proxies_spec.rb
sproutit-sproutcore-1.0.0.20090408130025 spec/lib/buildfile_commands/proxies_spec.rb
sproutit-sproutcore-1.0.0.20090416161445 spec/lib/buildfile_commands/proxies_spec.rb
sproutit-sproutcore-1.0.20090721145236 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1046 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1043 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1042 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1037 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1035 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1031 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1030 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1029 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1027 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1028 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1026 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1025 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1024 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1009 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1008 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.0.1003 spec/lib/buildfile_commands/proxies_spec.rb