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

Version Path
rhodes-2.0.3 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.2 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.rc2 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.rc1 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta11 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta10 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta9 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta8 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta7 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta6 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta4 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta3 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-1.5.5 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta2 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-2.0.0.beta1 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-1.5.4 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-1.5.3 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-1.5.2 spec/framework_spec/app/spec/rhoerror_spec.rb
rhodes-1.5.1 spec/framework_spec/app/spec/rhoerror_spec.rb