Sha256: 6a7bad4217e8a6a005a22c8011904001bed1727c8b47a9b5d4eaa71a9132bd5b

Contents?: true

Size: 552 Bytes

Versions: 17

Compression:

Stored size: 552 Bytes

Contents

require 'spec/helper'

class TCActionOne < Ramaze::Controller
  map '/'

  def index
    'Hello, World!'
  end

  def foo
    Ramaze::Action(:controller => self.class, :method => :bar).render
  end

  def bar
    "yo from bar"
  end
end

describe 'Action rendering' do
  behaves_like "http"
  ramaze

  it 'should render' do
    action = Ramaze::Action(:method => :index, :controller => TCActionOne)
    action.render.should == 'Hello, World!'
  end

  it 'should render inside the controller' do
    get('/foo').body.should == 'yo from bar'
  end
end

Version data entries

17 entries across 17 versions & 4 rubygems

Version Path
Pistos-ramaze-2008.09 spec/ramaze/action/render.rb
Pistos-ramaze-2008.12 spec/ramaze/action/render.rb
Pistos-ramaze-2009.01 spec/ramaze/action/render.rb
Pistos-ramaze-2009.02 spec/ramaze/action/render.rb
manveru-ramaze-2008.07 spec/ramaze/action/render.rb
manveru-ramaze-2008.08 spec/ramaze/action/render.rb
manveru-ramaze-2008.09 spec/ramaze/action/render.rb
manveru-ramaze-2008.10 spec/ramaze/action/render.rb
manveru-ramaze-2008.12 spec/ramaze/action/render.rb
manveru-ramaze-2009.01 spec/ramaze/action/render.rb
ptomato-ramaze-2009.02.1 spec/ramaze/action/render.rb
ptomato-ramaze-2009.02 spec/ramaze/action/render.rb
ramaze-2008.06 spec/ramaze/action/render.rb
ramaze-2009.01 spec/ramaze/action/render.rb
ramaze-2008.11 spec/ramaze/action/render.rb
ramaze-2009.03 spec/ramaze/action/render.rb
ramaze-2009.02 spec/ramaze/action/render.rb