Sha256: 42f659b5ad343d5f1ec272924609cc5d6dbbdd3eac9ecc015a59264ccf151fa9

Contents?: true

Size: 841 Bytes

Versions: 1

Compression:

Stored size: 841 Bytes

Contents

require 'Context/Gtk/Widget.rb'

module Context::Gtk 

	describe Widget do

        class FakeWidget
            include Widget
        end

        before(:each) do
			@widget = FakeWidget.new()
			@newWidget = FakeWidget.new()  
 			@oldWidget = FakeWidget.new()
       end

        it "should keep track of the main Window" do
            @widget.gtkWidgetMainWindow.should be_nil
            @widget.isAMainWindow
            @widget.gtkWidgetMainWindow.should be_eql(@widget)

			@widget.should_receive(:gtkAddWidget).with(@newWidget)
			@widget.addToThisWidget(@newWidget)
            @newWidget.gtkWidgetMainWindow.should be_eql(@widget)

			@widget.should_receive(:gtkRemoveWidget).with(@newWidget)
			@widget.removeFromThisWidget(@newWidget)            
            @newWidget.gtkWidgetMainWindow.should be_nil
        end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jldrill-0.5.1.7 spec/Context/Gtk/Widget_spec.rb