lib/spec/rails/example/cookies_proxy.rb in dchelimsky-rspec-rails-1.1.11.4 vs lib/spec/rails/example/cookies_proxy.rb in dchelimsky-rspec-rails-1.1.11.5

- old
+ new

@@ -7,10 +7,14 @@ def initialize(example) @example = example end def[]=(name, value) - @example.request.cookies[name.to_s] = CGI::Cookie.new(name.to_s, value) + if ::Rails::VERSION::STRING >= '2.3' + @example.request.cookies[name.to_s] = value + else + @example.request.cookies[name.to_s] = CGI::Cookie.new(name.to_s, value) + end end def [](name) @example.response.cookies[name.to_s] end