Sha256: fec743ce7342d9d709a34d1a986f95873d2a0d2a3aab8c5672bfe2b11c70c7ad

Contents?: true

Size: 530 Bytes

Versions: 7

Compression:

Stored size: 530 Bytes

Contents

require 'helper'

class Bacon::Context
  include Olelo::Templates
end

describe 'Olelo::Templates' do
  before do
    Olelo::Templates.enable_caching
    Olelo::Templates.loader = proc do |name|
      Olelo::VirtualFS::Embedded.new(__FILE__).read(name)
    end
  end

  after do
    Olelo::Templates.cache.clear
  end

  it 'should have #render' do
    render(:test, locals: {text: 'Hello, World!'}).should.equal "<h1>Hello, World!</h1>"
    Olelo::Templates.cache.size.should.equal 1
  end
end

__END__

@@ test.slim  
h1= text

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
olelo-0.9.15 test/templates_test.rb
olelo-0.9.14 test/templates_test.rb
olelo-0.9.13 test/templates_test.rb
olelo-0.9.12 test/templates_test.rb
olelo-0.9.11 test/templates_test.rb
olelo-0.9.10 test/templates_test.rb
olelo-0.9.9 test/templates_test.rb