Sha256: 580a0a1ecd017eefc2e6aa2ed783e1aab07b70b29245a70edd0c560b8aee4ffb
Contents?: true
Size: 639 Bytes
Versions: 1
Compression:
Stored size: 639 Bytes
Contents
#! /usr/bin/env ruby # coding: utf-8 require "test/unit" require "vasputils/setting.rb" class TC_Setting < Test::Unit::TestCase def setup @s = VaspUtils::Setting.new("example/dot.vasputils") end def test_initialize assert_raise(Errno::ENOENT){VaspUtils::Setting.new("not_exist_file")} end def test_get #assert_raise(VaspUtils::Setting::NoEntryError){@s.get("no_entory_key")} #assert_equal("/usr/local/calc/potcar/potpaw_PBE.52", @s.get("potcar_dir")) assert_raise(VaspUtils::Setting::NoEntryError){@s["no_entory_key"]} assert_equal("/usr/local/calc/potcar/potpaw_PBE.52", @s["potcar_dir"]) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vasputils-0.0.11 | test/test_setting.rb |