Archive for June, 2008

Ruby, Testing

Posted on June 1, 2008. Filed under: Uncategorized |

In Ruby -> Test::unit::TestCase is easy
require ‘test/unit’
 
the name of the class to be tested is Roman then the testing class will TestRoman < Test::Unit::TestCase
and a simple method
def test_simple
assert_equal (“expected_result”, call_to the method of class to be checked –>actual result)
end
for testing a particular method….
ruby test_roman.rb –name “name of the method”
location of the test file should
$:.unshift File.join(File.dirname(__FILE__),”..”,”lib”)
require….the [...]

Read Full Post | Make a Comment ( None so far )

Ruby – Numeric

Posted on June 1, 2008. Filed under: Uncategorized |

Numeric
Integer Float
FixNum BigNum Rational ComplexNum
nan?
zero?/nonzero?
finite?/infinite?,integer?
ceil,floor,round,
divmod,quo,remainder
next,succ,step(10,2),times,chr,

Read Full Post | Make a Comment ( None so far )

  •  

    June 2008
    M T W T F S S
    « Apr    
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    30  
  • My Fav

Liked it here?
Why not try sites on the blogroll...