lib/jldrill/spec/StoryMemento.rb in jldrill-0.5.1.7 vs lib/jldrill/spec/StoryMemento.rb in jldrill-0.6.0.1
- old
+ new
@@ -1,5 +1,6 @@
+# encoding: utf-8
require 'jldrill/contexts/MainContext'
require 'jldrill/spec/Fakes'
require 'jldrill/model/Config'
module JLDrill
@@ -35,14 +36,22 @@
def useTestDictionary
# Override with the small test dictionary
rc = @mainContext.loadReferenceContext
def rc.dictionaryName(options)
- testsDir = File.join(JLDrill::Config::DATA_DIR, "tests")
- return File.join(testsDir, "edict.utf")
+ return File.join("tests", "edict.utf")
end
end
+ def useChineseTestDictionary
+ @mainContext.quiz.options.language = "Chinese"
+ # Override with the small test dictionary
+ rc = @mainContext.loadReferenceContext
+ def rc.dictionaryName(options)
+ return File.join("tests", "cedict.utf")
+ end
+ end
+
def start
@app.enter
end
# This is very important to call when using setupGtk because otherwise