Categoria: cheatsheet,ruby

Ruby cheasheet

1234567891011121314# mock power2 function.def power2(x) x * xendrequire "test/unit"require 'mocha/test_unit'class TestSimpleNumber < Test::Unit::TestCase def test_simple expects(:power2).retur