class TestGtkIconTheme

Public Instance Methods

setup() click to toggle source
# File gtk2/test/test_gtk_icon_theme.rb, line 4
def setup
  @theme = Gtk::IconTheme.default
end
test_choose_icon() click to toggle source
# File gtk2/test/test_gtk_icon_theme.rb, line 8
def test_choose_icon
  only_gtk_version(2, 12)

  assert_nil(@theme.choose_icon("non-existent", 100))

  icon = @theme.choose_icon("face-cool", 10)
  assert_not_nil(icon)
  assert_match(/face-cool/, icon.filename)

  assert_not_nil(@theme.choose_icon("face-cool", 29, [:use_builtin, :no_svg]))
end
test_contexts() click to toggle source
# File gtk2/test/test_gtk_icon_theme.rb, line 20
def test_contexts
  only_gtk_version(2, 12)

  assert_operator(@theme.contexts, :include?, "MimeTypes")
end