Changeset 230

Show
Ignore:
Timestamp:
06/12/05 08:32:01 (3 years ago)
Author:
ged
Message:
  • Added Debuggable and Loggable.
  • Fixed PairStruct?.
  • Fixed the inheritance callback -- module_eval in the subclass, not class << subclass.
  • Added an accessor for @value.
  • Fixed up tests.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/property.tests.rb

    r224 r230  
    2727require 'fm/property' 
    2828 
     29require 'fm/properties/fuzzy' 
     30 
    2931### The Properties test suite 
    3032class FaerieMUD::PropertiesTestCase < FaerieMUD::TestCase 
     
    3234 
    3335    ### A concrete derivative of the FuzzyProperty class 
    34     class Luster < FuzzyProperty 
     36    class Luster < FaerieMUD::Property::Fuzzy 
    3537        def_kind "luster" 
    3638        def_synonyms %w{brightness brilliancy shinyness} 
     
    123125        tobj = @tobjClass::new 
    124126        stobj = @stobjClass::new 
    125         luster = Luster::new( 0.35 ) 
     127        shiny = Luster::new( 0.85 ) 
     128        dull = Luster::new( 0.35 ) 
    126129 
    127         tobj.addProperties( luster ) 
    128         assert tobj.is( "shiny" ), "test object isn't 'shiny'" 
     130        tobj.addProperties( shiny ) 
     131        assert_nothing_raised { rval = tobj.is?("shiny") } 
     132        assert_equal shiny, rval, "test object should be 'shiny'" 
    129133    end 
    130134