Sha256: 50a4bc1b62a070ef0576936fde72e5219da9faa68adf5c3f2cb6a72ccefa19f0

Contents?: true

Size: 542 Bytes

Versions: 56

Compression:

Stored size: 542 Bytes

Contents

require 'bacon'
require 'temple'

module TestHelper
  def with_html_safe(flag)
    String.send(:define_method, :html_safe?) { flag }
    yield
  ensure
    String.send(:undef_method, :html_safe?) if String.method_defined?(:html_safe?)
  end

  def grammar_validate(grammar, exp, message)
    lambda { grammar.validate!(exp) }.should.raise(Temple::InvalidExpression).message.should.equal message
  end

  def erb(src, options = {})
    Temple::ERB::Template.new(options) { src }.render
  end
end

class Bacon::Context
  include TestHelper
end

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
classiccms-0.5.16 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.15 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.14 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.13 vendor/bundle/gems/temple-0.4.0/test/helper.rb
temple-0.4.1 test/helper.rb
classiccms-0.5.12 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.11 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.10 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.9 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.8 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.7 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.6 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.5 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.2 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.1 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.5.0 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.4.2 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.4.1 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.4.0 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.3.9 vendor/bundle/gems/temple-0.4.0/test/helper.rb