Sha256: 04c2fd58fc5378785c5914a653a98bc236f3b4923c6573661c1c3bf91b40eb23

Contents?: true

Size: 525 Bytes

Versions: 32

Compression:

Stored size: 525 Bytes

Contents

require 'action_controller/cookies'

module Spec
  module Rails
    module Example
      class CookiesProxy
        def initialize(example)
          @example = example
        end
      
        def[]=(name, value)
          @example.request.cookies[name.to_s] = CGI::Cookie.new(name.to_s, value)
        end
        
        def [](name)
          @example.response.cookies[name.to_s]
        end
      
        def delete(name)
          @example.response.cookies.delete(name.to_s)
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 6 rubygems

Version Path
jstorimer-deep-test-0.2.0 sample_rails_project/vendor/plugins/rspec_on_rails/lib/spec/rails/example/cookies_proxy.rb
jstorimer-deep-test-0.1.0 sample_rails_project/vendor/plugins/rspec_on_rails/lib/spec/rails/example/cookies_proxy.rb
pictrails-0.5.0 vendor/plugins/rspec-rails/lib/spec/rails/example/cookies_proxy.rb
rspec-rails-1.1.10 lib/spec/rails/example/cookies_proxy.rb
rspec-rails-1.1.11 lib/spec/rails/example/cookies_proxy.rb
rspec-rails-1.1.6 lib/spec/rails/example/cookies_proxy.rb
rspec-rails-1.1.7 lib/spec/rails/example/cookies_proxy.rb
rspec-rails-1.1.8 lib/spec/rails/example/cookies_proxy.rb
rspec-rails-1.1.5 lib/spec/rails/example/cookies_proxy.rb
rspec-rails-1.1.9 lib/spec/rails/example/cookies_proxy.rb
typo-5.1.98 vendor/plugins/rspec-rails/lib/spec/rails/example/cookies_proxy.rb
typo-5.2 vendor/plugins/rspec-rails/lib/spec/rails/example/cookies_proxy.rb