Sha256: 0ced6ecd89267338dbb0d451c373c2d0930ac33a24621e5ad70b7bd79659c042
Contents?: true
Size: 784 Bytes
Versions: 2
Compression:
Stored size: 784 Bytes
Contents
require 'spec_helper' require 'volt/page/path_string_renderer' unless RUBY_PLATFORM == 'opal' describe Volt::PathStringRenderer do before do kitchen_sink_path = File.expand_path(File.join(File.dirname(__FILE__), '../apps/kitchen_sink')) app = Volt::App.new(kitchen_sink_path) @page = app.page end it 'should render a section' do html = Volt::PathStringRenderer.new('main/mailers/welcome/subject', nil, @page).html expect(html).to eq("\n Welcome to the site!\n\n") end it 'should render a section with a variable' do html = Volt::PathStringRenderer.new('main/mailers/welcome/html', {:name => 'Jimmy'}, @page).html expect(html).to eq("\n <h1>Welcome Jimmy</h1>\n\n <p>Glad you signed up!</p>\n\n") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
volt-0.9.1 | spec/page/path_string_renderer_spec.rb |
volt-0.9.1.pre5 | spec/page/path_string_renderer_spec.rb |