Sha256: 7b988c68fad8d110bba5e4605b4cb62fa76dd1c609a0e5d24b586789d631404b

Contents?: true

Size: 668 Bytes

Versions: 2

Compression:

Stored size: 668 Bytes

Contents

#          Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.

require 'spec/helper'

class TrinitySessionController < Ramaze::Controller
  map :/

  def index
    "nothing"
  end
end

describe "Session" do
  behaves_like 'http'
  ramaze :sessions => false

  it 'should work without sessions' do
    class Ramaze::Session
      remove_const :IP_COUNT_LIMIT
      const_set(:IP_COUNT_LIMIT, 2)
    end
    (Ramaze::Session::IP_COUNT_LIMIT + 2).times do
      r = get('/')
      r.body.should == "nothing"
      r.headers.should == {'Content-Type' => 'text/html'}
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ramaze-0.3.0 spec/ramaze/trinity/session.rb
ramaze-0.3.5 spec/ramaze/trinity/session.rb