test/lib/clwiki/index_test.rb in clwiki-2.3.2 vs test/lib/clwiki/index_test.rb in clwiki-2.4.0

- old
+ new

@@ -1,6 +1,6 @@ -require File.dirname(__FILE__) + '/clwiki_test_helper' +require_relative 'clwiki_test_helper' require 'index' class TestClWikiIndex < TestBase def test_indexing_files_with_same_mod_timestamp @temp_sub_dir = File.join(@temp_dir, 'SubPage') @@ -11,11 +11,11 @@ FileUtils.makedirs(File.dirname(fn)) File.open(fn, 'w+') do |f| f.puts "sample file" end end # couldn't find a way to set the mtime quickly, so just trusting # the above code will run within the same second... - assert_in_delta(File.mtime(file_a), File.mtime(file_b), 1.second) - assert_in_delta(File.mtime(file_a), File.mtime(file_c), 1.second) + assert_in_delta(File.mtime(file_a), File.mtime(file_b), 1) + assert_in_delta(File.mtime(file_a), File.mtime(file_c), 1) @mtime = File.mtime(file_a) @i = ClWiki::Indexer.new $wiki_conf.access_log_index = false Dir.chdir(@temp_dir) do # puts .dat files into the tmp dir