Sha256: eee3b29c55e1d47f3c098f8d8411d6646232ba04df3adba600a0b72aabc30787

Contents?: true

Size: 870 Bytes

Versions: 10

Compression:

Stored size: 870 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 MainController < Ramaze::Controller
  template :non_existant_method, :list
end

class TCActionOtherLayout < Ramaze::Controller
  map '/other'
  layout '/other_wrapper'

  def index
    "Others Hello"
  end
end

describe "Testing Actionless Templates" do
  behaves_like 'http'
  ramaze :actionless_templates => false,
         :view_root => __DIR__(:view), :error_page => true

  it "should not find template file for non existant method" do
    get('/non_existant_method').status.should == 404
    get('/non_existant_method2').status.should == 404
  end

  it "should render layout(without method) for normal action" do
    get('/other/index').body.should == '<p>Others Hello</p>'
  end
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
Pistos-ramaze-2008.12 spec/ramaze/controller/actionless_templates.rb
Pistos-ramaze-2009.01 spec/ramaze/controller/actionless_templates.rb
Pistos-ramaze-2009.02 spec/ramaze/controller/actionless_templates.rb
manveru-ramaze-2008.12 spec/ramaze/controller/actionless_templates.rb
manveru-ramaze-2009.01 spec/ramaze/controller/actionless_templates.rb
ptomato-ramaze-2009.02.1 spec/ramaze/controller/actionless_templates.rb
ptomato-ramaze-2009.02 spec/ramaze/controller/actionless_templates.rb
ramaze-2009.01 spec/ramaze/controller/actionless_templates.rb
ramaze-2009.03 spec/ramaze/controller/actionless_templates.rb
ramaze-2009.02 spec/ramaze/controller/actionless_templates.rb