Sha256: d4c1585593e092ba06721affc4d1b694bce44fa653a6827ea4850bceba0a55b4

Contents?: true

Size: 1.01 KB

Versions: 65

Compression:

Stored size: 1.01 KB

Contents

require "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

65 entries across 65 versions & 1 rubygems

Version Path
sproutcore-1.11.0 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.11.0.rc3 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.11.0.rc2 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.11.0.rc1 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.10.3.1 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.10.2 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.10.1 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.10.0 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.10.0.rc.3 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.10.0.rc.2 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.10.0.rc.1 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.9.2 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.9.1 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.9.0 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.8.2.1 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.8.1 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.8.0 spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.7.1.beta-java spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.7.1.beta spec/lib/buildfile_commands/proxies_spec.rb
sproutcore-1.6.0.1-java spec/lib/buildfile_commands/proxies_spec.rb