Sha256: 5bf3526e356e3245c8a9774e95c093f806abaeaf7352a7200f1ef322bd34b046
Contents?: true
Size: 683 Bytes
Versions: 14
Compression:
Stored size: 683 Bytes
Contents
# -*- encoding: utf-8 -*- require 'minitest/autorun' require 'time' require 'webgen/item_tracker/file' class TestItemTrackerFile < Minitest::Test def setup @website = MiniTest::Mock.new @obj = Webgen::ItemTracker::File.new(@website) end def test_item_id assert_equal('filename', @obj.item_id('filename')) end def test_item_data assert_equal(File.mtime(__FILE__), @obj.item_data(__FILE__)) end def test_item_changed? refute(@obj.item_changed?(__FILE__, Time.now)) assert(@obj.item_changed?(__FILE__, Time.parse("1980-01-01"))) end def test_referenced_nodes assert_equal([], @obj.referenced_nodes('anything', 'nothing')) end end
Version data entries
14 entries across 14 versions & 1 rubygems