Sha256: 52ba6219367af8705bcbd687b6de935265fc9acfd09ccc703f10b789bbaf02c3
Contents?: true
Size: 839 Bytes
Versions: 10
Compression:
Stored size: 839 Bytes
Contents
require 'spec_helper' require 'rack/test' describe 'Integration with Sinatra for partials' do include Rack::Test::Methods let(:app){ sinatra_app do set :accessible, "world" set :views, fixtures_folder/'templates' template :internal_partial do "Hello ${who}!" end helpers do def accessible; settings.accessible; end end get '/external' do wlang ">{hello}", :locals => {:who => "sinatra"} end get '/internal' do wlang ">{internal_partial}", :locals => {:who => "sinatra"} end end } it 'renders external partials correcty' do get '/external' last_response.body.should eq("Hello sinatra!") end it 'renders internal partials correcty' do get '/internal' last_response.body.should eq("Hello sinatra!") end end
Version data entries
10 entries across 10 versions & 1 rubygems