Sha256: 9a7b9d4301491f2de73d4074dc55ef5f9ddc1b8a89a41c7ea3596466ca273358

Contents?: true

Size: 555 Bytes

Versions: 3

Compression:

Stored size: 555 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
  before :all do
    ramaze
  end

  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

3 entries across 3 versions & 1 rubygems

Version Path
ramaze-0.1.4 spec/ramaze/action/render.rb
ramaze-0.2.1 spec/ramaze/action/render.rb
ramaze-0.2.0 spec/ramaze/action/render.rb