spec/jldrill/model/Config_spec.rb in jldrill-0.5.1.7 vs spec/jldrill/model/Config_spec.rb in jldrill-0.6.0.1
- old
+ new
@@ -1,5 +1,6 @@
+# encoding: utf-8
require 'jldrill/model/Config'
module JLDrill
describe Config do
@@ -20,8 +21,25 @@
# Reset this so the other tests don't fail
def Gem.datadir(string)
nil
end
Config::DATA_DIR.should eql(File.expand_path("data/jldrill"))
+ end
+
+ def should_resolve(filename)
+ Config::resolveDataFile(filename).should_not eql(nil)
+ end
+
+ it "should resolve data files according to the load path" do
+ should_resolve(Config::QUIZ_DIR)
+ should_resolve(Config::SVG_ICON_FILE)
+ should_resolve(Config::PNG_ICON_FILE)
+ should_resolve(File.join(Config::DICTIONARY_DIR,
+ Config::DICTIONARY_FILE))
+ should_resolve(Config::KANJI_FILE)
+ should_resolve(Config::RADICAL_FILE)
+ should_resolve(Config::KANA_FILE)
+ should_resolve(Config::TANAKA_FILE)
+ should_resolve(Config::DEINFLECTION_FILE)
end
end
end