require File.dirname(__FILE__) + '/helper' describe Frank::TemplateHelpers do include Rack::Test::Methods def app Frank.bootstrap(File.join(File.dirname(__FILE__), 'template')) require File.join(Frank.root, 'helpers') Frank.new do set :environment, :test end end before(:all) do @app = app end it 'render haml and use hello_helper' do template = @app.render('helper_test.haml') template.should == "
/helper_test
\n
\n

hello from helper

\n
\n" end it 'sets an instance variable, which the layout should render correctly' do template = @app.render('setting_in_layout.haml') template.should == "
BLAH!
\n
/setting_in_layout
\n
\n

hello

\n
\n" end it 'should render the refresh javascript' do template = @app.render('refresh.haml') template.should include("