Sha256: d6d4d41d5855f84e6893abdebb3d82bdc80ec9c92a3cf547723ea2bb9977dbed

Contents?: true

Size: 798 Bytes

Versions: 1

Compression:

Stored size: 798 Bytes

Contents

require 'Context/Bridge'
require 'jldrill/contexts/ShowStatisticsContext'
require 'jldrill/model/Quiz/Quiz'
require 'jldrill/views/test/StatisticsView'


module JLDrill

	describe ShowStatisticsContext::StatisticsView do
	
	    before(:each) do
			@context = JLDrill::ShowStatisticsContext.new(Context::Bridge.new(JLDrill::Test))
	        @context.createViews
	        @view = @context.mainView
	    end
	    
        it "should be able to update the statistics in the view" do
            quiz = Quiz.new
            @view.quiz.should be_nil
            @view.update(quiz)
            @view.quiz.should be(quiz)
        end
        
        it "should exit the context when the view is closed" do
            @context.should_receive(:exit)
            @view.close
        end
        
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jldrill-0.5.1.7 spec/jldrill/views/StatisticsView_spec.rb