Sha256: 240d13c70d4feec93b6cf58c816494d52ecd1d928c08bb2ec716c5dfec705703

Contents?: true

Size: 563 Bytes

Versions: 5

Compression:

Stored size: 563 Bytes

Contents

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

require File.expand_path('../../../../spec/helper', __FILE__)

class SpecHelperRequestAccessor < Ramaze::Controller
  map '/'
  helper :request_accessor

  def index
    get? ? 'GET' : request_method
  end
end

describe 'Ramaze::Helper::RequestAccessor' do
  behaves_like :rack_test

  it 'gives direct access to methods in Request' do
    get('/').body.should == 'GET'
    put('/').body.should == 'PUT'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ramaze-2023.01.06 spec/ramaze/helper/request_accessor.rb
ramaze-2012.12.08 spec/ramaze/helper/request_accessor.rb
ramaze-2012.12.08b spec/ramaze/helper/request_accessor.rb
ramaze-2012.04.14 spec/ramaze/helper/request_accessor.rb
ramaze-2012.03.07 spec/ramaze/helper/request_accessor.rb