Sha256: cf5d5aa9b458db3a99eb2db4e64024f7abc0f3c991705933018a679d45c26d6b
Contents?: true
Size: 1.39 KB
Versions: 23
Compression:
Stored size: 1.39 KB
Contents
require 'spec/spec_helper' class ControllerWithRadiantLayout < ApplicationController radiant_layout 'main' end class ControllerWithRadiantLayoutBlock < ApplicationController radiant_layout {|c| c.action_name == "index" ? "main" : "utf8"} end describe ControllerWithRadiantLayout do dataset :layouts before(:each) do layouts(:main) end it "should have radiant layout attribute" do ControllerWithRadiantLayout.read_inheritable_attribute('radiant_layout').should == 'main' # This doesn't seem to work anymore, but calling "active_layout" on an instance still correctly returns "layouts/radiant.rhtml" #ControllerWithRadiantLayout.read_inheritable_attribute('layout').should == 'radiant' end it "should return 'radiant' when read_inheritable_attribute('layout') is called" end describe ControllerWithRadiantLayoutBlock do dataset :layouts before(:each) do layouts(:main) end it "should have radiant layout block" do ControllerWithRadiantLayoutBlock.read_inheritable_attribute('radiant_layout').should be_kind_of(Proc) # This doesn't seem to work anymore, but calling "active_layout" on an instance still correctly returns "layouts/radiant.rhtml" #ControllerWithRadiantLayoutBlock.read_inheritable_attribute('layout').should == 'radiant' end it "should return 'radiant' when read_inheritable_attribute('layout') is called" end
Version data entries
23 entries across 23 versions & 2 rubygems