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.7.5 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.7.4 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.7.3 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.7.2 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.7.1 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.7.0 vendor/bundle/gems/temple-0.4.0/test/helper.rb
temple-0.6.0 test/helper.rb
classiccms-0.6.9 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.6.8 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.6.7 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.6.6 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.6.5 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.6.4 vendor/bundle/gems/temple-0.4.0/test/helper.rb
temple-0.5.5 test/helper.rb
classiccms-0.6.3 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.6.2 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.6.1 vendor/bundle/gems/temple-0.4.0/test/helper.rb
classiccms-0.6.0 vendor/bundle/gems/temple-0.4.0/test/helper.rb
temple-0.5.4 test/helper.rb
classiccms-0.5.17 vendor/bundle/gems/temple-0.4.0/test/helper.rb