Sha256: 4fe1778305ed0385b3695a04d7622629ca67a77e7845a14f63859497843d83b9

Contents?: true

Size: 376 Bytes

Versions: 3

Compression:

Stored size: 376 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'webgen/test_helper'
require 'webgen/tag/date'
require 'time'

class TestTagDate < MiniTest::Unit::TestCase

  include Webgen::TestHelper

  def test_call
    context = setup_context
    context[:config] = {'tag.date.format' => '%Y%m%d'}

    assert_equal(Time.now.strftime("%Y%m%d"), Webgen::Tag::Date.call('date', '', context))
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
webgen-1.0.0.beta3 test/webgen/tag/test_date.rb
webgen-1.0.0.beta2 test/webgen/tag/test_date.rb
webgen-1.0.0.beta1 test/webgen/tag/test_date.rb