Sha256: 8dbe622dceb24ec1e0a51f5c4fabb9317a5cb9144f7a39cf4f387e42ca7aa146
Contents?: true
Size: 731 Bytes
Versions: 17
Compression:
Stored size: 731 Bytes
Contents
require "minitest/autorun" require "minitest/unit" require "nikki" require 'fileutils' class NikkiTest < MiniTest::Unit::TestCase include Nikki nikki = Generator.new FileUtils.rm(nikki.file) if nikki.file_exist? FileUtils.rm(nikki.config_file) if nikki.config_file_exist? def test_file_exist? nikki = Generator.new assert_equal(true,nikki.file_exist?) end def test_read_config nikki = Generator.new assert(nikki.read_config.class == Hash) end def test_updated_yesterday? nikki = Generator.new settings = nikki.read_config settings[:updated] = nikki.today-1 nikki.write_config(settings) assert(nikki.updated_yesterday?,"Journal wasn't updated last yesterday.") end end
Version data entries
17 entries across 17 versions & 1 rubygems