require 'action_tree' require 'haml' module Templated extend ActionTree::Basic class Node < ActionTree::Basic::Node; end class Query < ActionTree::Basic::Query; end #use ActionTree::Components::Templating end =begin describe Templated::Node do pending 'still passes normal specs' it 'allows setting view path' do subject.view_path('Bahamas') subject.view_path.should == 'Bahamas' end it 'inherits view path' do subject.view_path('Brazil') subject.action('/mediocrity') { 'hmm..' } subject.match('/mediocrity').view_path.should == 'Brazil' end it 'inherits layout path' do subject.layout('Congo') subject.action('Uzbekistan') { } subject.match('Uzbekistan').layout.should == 'Congo' end # inherits layouts, independent by namespace describe 'renders' do it 'haml' do subject.view_path('.') subject.action { render 'spec/fixtures/test.haml' } subject.match.run.should == "

Yippee

\n" end it 'haml within a layout defined by an ancestor' do subject.layout('/spec/fixtures/test_layout.haml') subject.action('hi') { render 'spec/fixtures/test.haml' } subject.match('hi').run.should == "

Yippee

\n" end end end =end