Sha256: 6e3278f41715dd0bcd8f991b5a7a9fe0a38e752caa57ebf1dd7935af001bd3fb

Contents?: true

Size: 968 Bytes

Versions: 1

Compression:

Stored size: 968 Bytes

Contents

require 'Context/Bridge'
require 'jldrill/contexts/ShowStatisticsContext'
require 'jldrill/views/gtk/StatisticsView'
require 'jldrill/contexts/MainContext'
require 'jldrill/views/gtk/MainWindowView'
require 'jldrill/model/Quiz/Quiz'


module JLDrill::Gtk

	describe StatisticsView do

        before(:all) do
            @story = JLDrill::StoryMemento.new("StatisticsView")

            def @story.setup(type)
                super(type)
                @context = @mainContext.showStatisticsContext
                @view = @context.peekAtView
            end
        end

        it "should close the view when the window is destroyed" do
            @story.setup(JLDrill::Gtk)
            @story.start
            @story.mainContext.showStatistics
            @story.view.should_receive(:close) do
                @story.view.statisticsWindow.destroy
            end
            @story.view.emitDestroyEvent
            @story.shutdown
        end
        
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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