Sha256: 3197949b1e35d2b9925317433940061aa58cfe0bf380cb3893a308ffe29b5ff1

Contents?: true

Size: 641 Bytes

Versions: 6

Compression:

Stored size: 641 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))

describe Merb::Test::Cookie do

  describe "#valid?" do
    before(:all) do
      @cookie = Merb::Test::Cookie.new("path=/", ".example.org")
    end

    it "should return true for base domain" do
      %w[example.org example.org/ example.org/some/path].each do |url|
        @cookie.valid?(URI("http://#{url}")).should be_true
      end
    end

    it "should return true for subdomains" do
      %w[foo.example.org foo.example.org/ foo.example.org/some/path].each do |url|
        @cookie.valid?(URI("http://#{url}")).should be_true
      end
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
merb-core-1.1.3 spec/public/test/cookie_jar_spec.rb
merb-core-1.1.2 spec/public/test/cookie_jar_spec.rb
merb-core-1.1.1 spec/public/test/cookie_jar_spec.rb
merb-core-1.1.0 spec/public/test/cookie_jar_spec.rb
merb-core-1.1.0.rc1 spec/public/test/cookie_jar_spec.rb
merb-core-1.1.0.pre spec/public/test/cookie_jar_spec.rb