Sha256: e00d735988957c1d357c2d86460b219a6bd1a2b5da52abd023f808cd83118c44

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

# encoding: utf-8
require 'Context/Bridge'
require 'jldrill/contexts/MainContext'
require 'jldrill/views/gtk/MainWindowView'
require 'jldrill/views/gtk/OptionsView'
require 'jldrill/spec/StoryMemento'

module JLDrill::Gtk

	describe MainWindowView do

        before(:all) do
            @story = JLDrill::StoryMemento.new("MainWindowView")
            def @story.setup(type)
                super(type)
                @context = @mainContext
                @view = @mainView
            end
        end

		it "should have a widget when initialized" do
		    @story.setup(JLDrill::Gtk)
		    @story.start
			@story.view.getWidget.should_not be_nil
			@story.shutdown
		end

		it "should react to destroy signals" do
		    @story.setup(JLDrill::Gtk)
		    @story.start
			@story.view.should_receive(:close) do
			    @story.context.exit
			end
			@story.view.emitDestroyEvent
			@story.restart
		end 

        it "should have an icon" do
		    @story.setup(JLDrill::Gtk)
		    @story.start
            @story.view.icon.icon.should_not be(nil)
            @story.view.mainWindow.icon.should be_equal(@story.view.icon.icon)
            @story.shutdown
        end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jldrill-0.6.0.1 spec/jldrill/views/gtk/MainWindowView_spec.rb