a minimal abstract Ruby API that models HTTP. such as Sinatra, Ruby on Rails Rack http://rack.rubyforge.org/ Sinatra http://www.sinatrarb.com Ruby on Rails http://rubyonrails.org/
f.read end end begin open_my_file("block_demo.r") rescue => e puts e else puts "it's working good!" ensure puts "this must be executed, no matter what" end
do it "should calc the correct bmi" do calc_bmi(175, 80).must_equal 26.12 end end def calc_bmi(height, weight) bmi = ( weight / (height/100.0) ** 2 ).round(2) end