Sha256: bd6c64bcc032e3cd9ee9306567e1e2402ae262971126bf280dcb6bfa1c09aced

Contents?: true

Size: 714 Bytes

Versions: 2

Compression:

Stored size: 714 Bytes

Contents

require_relative "test_helper"

class TestTestCase < DysTest

  def dys
    @dys ||= DocYoSelf::TestCase.new(request, response)
  end

  def test_compile_template
    template     = "<%= 2 + 2 %>"
    dys.template = template
    assert_equal dys.template, template,
      "Could not set a template."
    assert_equal "4", dys.compile_template,
      "Could not compile template"
  end

  def test_compile_with_file
    DocYoSelf.config { |c| c.template_file = 'test/fake_template.md' }
    test = DocYoSelf::TestCase.new(request, response)
    test.template = DocYoSelf::Conf.template
    assert_includes test.compile_template, "use ERB"
  end

  def test_created_at
    assert dys.created_at.is_a?(Time)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
doc_yo_self-0.0.2 test/test_test_case.rb
doc_yo_self-0.0.1 test/test_test_case.rb