Sha256: ae854111a62c4ec1ab4e3bea92f53c0b9ab2205bf01295950e249b87ea9668be

Contents?: true

Size: 422 Bytes

Versions: 15

Compression:

Stored size: 422 Bytes

Contents

# http://github.com/pivotal/cacheable-flash

# modified the original helper to unescape stuff
module CacheableFlash
  module TestHelpers
    def flash_cookie
      return {} unless cookies['flash']
      flash = CGI::unescape cookies['flash']
      flash = flash ? JSON.parse(flash) : {}
      HashWithIndifferentAccess.new flash
    end
  end
end
ActionController::TestResponse.send :include, CacheableFlash::TestHelpers

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
adva-0.3.2 test/test_helper/extensions/cacheable_flash.rb
adva-0.3.1 test/test_helper/extensions/cacheable_flash.rb
adva-0.3.0 test/test_helper/extensions/cacheable_flash.rb
adva-0.2.4 test/test_helper/extensions/cacheable_flash.rb
adva-0.2.3 test/test_helper/extensions/cacheable_flash.rb
adva-0.2.2 test/test_helper/extensions/cacheable_flash.rb
adva-0.2.1 test/test_helper/extensions/cacheable_flash.rb
adva-0.2.0 test/test_helper/extensions/cacheable_flash.rb
adva-0.1.4 test/test_helper/extensions/cacheable_flash.rb
adva-0.1.3 test/test_helper/extensions/cacheable_flash.rb
adva-0.1.2 test/test_helper/extensions/cacheable_flash.rb
adva-0.1.1 test/test_helper/extensions/cacheable_flash.rb
adva-0.1.0 test/test_helper/extensions/cacheable_flash.rb
adva_cms-0.0.1 test/test_helper/extensions/cacheable_flash.rb
adva-0.0.1 adva_cms/test/test_helper/extensions/cacheable_flash.rb