Sha256: 9b77dfebfebce7b4515e034f48ab7f301e8b0392d71846ec87538bf64976f1e5
Contents?: true
Size: 1.13 KB
Versions: 24
Compression:
Stored size: 1.13 KB
Contents
# # rhoerror_spec.rb # rhodes # # Copyright (C) 2008 Rhomobile, Inc. All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # require 'spec/spec_helper' describe "RhoError" do it "should save error code" do error = Rho::RhoError.new(Rho::RhoError::ERR_RUNTIME); error.code.should == Rho::RhoError::ERR_RUNTIME end it "should catch the error" do error = Rho::RhoError.new(Rho::RhoError::ERR_RUNTIME); begin raise error rescue Rho::RhoError $!.code.should == Rho::RhoError::ERR_RUNTIME end end end
Version data entries
24 entries across 24 versions & 1 rubygems