Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • test/unit/ui/gtk2/testrunner.rb

Parent

Test::Unit::UI::GTK2::FaultList

Public Class Methods

new() click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 25
def initialize
  @faults = []
  @model = Gtk::ListStore.new(String, String)
  super(@model)
  column = Gtk::TreeViewColumn.new
  column.visible = false
  append_column(column)
  renderer = Gtk::CellRendererText.new
  column = Gtk::TreeViewColumn.new("Failures", renderer, {:text => 1})
  append_column(column)
  selection.mode = Gtk::SELECTION_SINGLE
  set_rules_hint(true)
  set_headers_visible(false)
end
            

Public Instance Methods

add_fault(fault) click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 40
def add_fault(fault)
  @faults.push(fault)
  iter = @model.append
  iter.set_value(0, (@faults.length - 1).to_s)
  iter.set_value(1, fault.short_display)
end
            
clear() click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 51
def clear
  model.clear
end
            
get_fault(iter) click to toggle source
 
               # File test/unit/ui/gtk2/testrunner.rb, line 47
def get_fault(iter)
  @faults[iter.get_value(0).to_i]
end