mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Reverting due to Ruby 1.8.7 incompatibility
Revert "Merge pull request #66 from kylewlacy/master" This reverts commit 1ad87b6730064300234c6796f214c9eb8c895efa, reversing changes made to 21415118af38224ca34948ef0b621b57c1201820.
This commit is contained in:
parent
b5293a7a6f
commit
a03684c4ef
2 changed files with 2 additions and 11 deletions
|
@ -87,10 +87,8 @@ module Sinatra
|
|||
response_cookies[key.to_s] || request_cookies[key.to_s]
|
||||
end
|
||||
|
||||
def []=(key, options = {}, value)
|
||||
options = @options.merge(options).merge(:value => value)
|
||||
|
||||
@response.set_cookie key.to_s, options
|
||||
def []=(key, value)
|
||||
@response.set_cookie key.to_s, @options.merge(:value => value)
|
||||
end
|
||||
|
||||
def assoc(key)
|
||||
|
|
|
@ -124,13 +124,6 @@ describe Sinatra::Cookies do
|
|||
cookie_jar['foo'].should be == 'bar'
|
||||
end
|
||||
|
||||
it 'sets a cookie with extra options' do
|
||||
cookie_route do
|
||||
cookies['foo', :path => '/baz'] = 'bar'
|
||||
response['Set-Cookie'].lines.detect { |l| l.start_with? 'foo=' }
|
||||
end.should include('path=/baz')
|
||||
end
|
||||
|
||||
it 'adds a value to the cookies hash' do
|
||||
cookie_route do
|
||||
cookies['foo'] = 'bar'
|
||||
|
|
Loading…
Reference in a new issue