Jldrill Git C0 Coverage Information - RCov

lib/jldrill/views/gtk/MainWindowView.rb

Name Total Lines Lines of Code Total Coverage Code Coverage
lib/jldrill/views/gtk/MainWindowView.rb 43 34
90.70%
88.24%

Key

Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.

Coverage Details

1 require 'Context/Gtk/Widget'
2 require 'Context/Views/Gtk/Widgets/MainWindow'
3 require 'Context/Views/Gtk/Widgets/VBox'
4 require 'jldrill/contexts/MainContext'
5 require 'gtk2'
6 
7 module JLDrill::Gtk
8 
9 	class MainWindowView < JLDrill::MainContext::MainWindowView
10         
11         attr_reader :icon, :mainWindow
12 
13 		def initialize(context)
14 			super(context)
15 			@mainWindow = Context::Gtk::MainWindow.new("JLDrill", self)
16             # GTK+ on windows doesn't have SVG, so if this fails read the PNG
17             begin
18                 @icon = Gdk::Pixbuf.new(File.join(JLDrill::Config::DATA_DIR, 
19                                                   "icon.svg"))
20             rescue
21                 @icon = Gdk::Pixbuf.new(File.join(JLDrill::Config::DATA_DIR,
22                                                   "icon.png"))
23             end
24             @mainWindow.icon_list=([@icon])
25 
26 			@mainWindow.set_default_size(600, 400)
27 			@vbox = Context::Gtk::VBox.new
28             @mainWindow.addToThisWidget(@vbox)
29 		end
30 
31 		def getWidget
32 			@vbox
33 		end
34 
35 		def destroy
36 		    @mainWindow.explicitDestroy
37 		end
38 
39 		def emitDestroyEvent
40 			@mainWindow.signal_emit("destroy")
41 		end
42 	end
43 end

Generated on Mon May 23 16:17:46 +0900 2011 with rcov 0.9.8