Updated cookbook.rb and cookbook_testcode.rb with correct code