spec/jldrill/model/Quiz/Strategy_spec.rb in jldrill-0.5.1.7 vs spec/jldrill/model/Quiz/Strategy_spec.rb in jldrill-0.6.0.1

- old
+ new

@@ -1,5 +1,6 @@ +# encoding: utf-8 require 'jldrill/model/Quiz/Strategy' require 'jldrill/model/Contents' require 'jldrill/model/items/Vocabulary' require 'jldrill/model/Problem' require 'jldrill/model/problems/ProblemFactory' @@ -23,22 +24,22 @@ @strategy.status.should be_eql(" 0%") end it "should increment the statistics if correct in bin 4" do @quiz.currentProblem.item.bin.should be(4) - @strategy.stats.accuracy.should be(0) + @strategy.reviewStats.accuracy.should be(0) @strategy.correct(@quiz.currentProblem.item) - @strategy.stats.accuracy.should be(100) + @strategy.reviewStats.accuracy.should be(100) end it "should decrement the statistics if incorrect in bin 4" do @quiz.currentProblem.item.bin.should be(4) - @strategy.stats.accuracy.should be(0) + @strategy.reviewStats.accuracy.should be(0) @strategy.correct(@quiz.currentProblem.item) - @strategy.stats.accuracy.should be(100) + @strategy.reviewStats.accuracy.should be(100) @strategy.incorrect(@quiz.currentProblem.item) - @strategy.stats.accuracy.should be(50) + @strategy.reviewStats.accuracy.should be(50) end it "should use the contents from the quiz" do @strategy.contents.should be(@quiz.contents) end @@ -159,16 +160,16 @@ end # We have enough items, and we haven't learned the review items # to the required level, so we should review @strategy.shouldReview?.should be(true) 0.upto(9) do - @strategy.stats.correct(item) + @strategy.reviewStats.correct(item) end # We don't start the countdown until we have reviewed 10 items # so we should continue to review @strategy.shouldReview?.should be(true) 0.upto(9) do - @strategy.stats.correct(item) + @strategy.reviewStats.correct(item) end # Now we know the items well enough, and we have reviewed # enough items, so we shouldn't review @strategy.shouldReview?.should be(false) end