add test suite

On Wed, Sep 03, 2014 at 12:43:38AM -0700, Josef Reidinger wrote:
> In src/lib/fonts/fonts-config-state.rb:
> 
> >      end
> >
> >      def self.is_preset(key)
> > -      @@presets.keys.index(key)
> > +      PRESETS.keys.index(key)
> 
> I expect that it return boolean. Also in ruby is convention to have such method
> as preset? instead of java style is_preset
> so it can look like
> 
> def self.preset?(key)
>   PRESETS.has_key?(key)
> end

Ok, that sounds reasonable.

> another idea. I think there is mixture of presets and fonts. I think presets

I do not agree (if I understand your concern correctly). Preset is
predefined State of the _whole_ dialog. This is intended because font
rendering depends on (a) fonts that are used and (b) font rendering
algorithms and these two aspects are indivisible. Otherwise it would
be misleading at least for me. In other words, I wouldn't like to
divide mapping:

dialog <-> FontsConfigState <-> sysconfig file <-> fontconfig rules

in any way. Therefore also Preset should not be divided in any way,
imho.