Sha256: 1e3519b60c87b06a0c62be6228c08b3571b6d4f3ecdd211c868fbb2e41b5aa9d

Contents?: true

Size: 575 Bytes

Versions: 6

Compression:

Stored size: 575 Bytes

Contents

require 'spec/helper'

class TCRecordController < Ramaze::Controller
  map '/'

  def index
    'The index'
  end

  def foo
    'The foo'
  end
end

describe 'Adapter recording' do
  setup do
    ramaze :adapter => :webrick, :record => lambda{|request|
      request.remote_addr == '127.0.0.1'
    }

    @record = Ramaze::Record
  end

  it 'should record' do
    get('/').body.should == 'The index'
    get('/foo').body.should == 'The foo'
    @record.should have(2).requests
    @record.first.path_info.should == '/'
    @record.last.path_info.should == '/foo'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ramaze-0.1.1 spec/ramaze/adapter/record.rb
ramaze-0.1.2 spec/ramaze/adapter/record.rb
ramaze-0.1.3 spec/ramaze/adapter/record.rb
ramaze-0.1.4 spec/ramaze/adapter/record.rb
ramaze-0.2.1 spec/ramaze/adapter/record.rb
ramaze-0.2.0 spec/ramaze/adapter/record.rb