Sha256: fda22fe4b6eab2cfc0c0ccbb76dc53934944e1c243b9f596c200a16662be746a

Contents?: true

Size: 928 Bytes

Versions: 29

Compression:

Stored size: 928 Bytes

Contents

require 'spec_helper'
require "falkorlib/error"


describe FalkorLib::Error do

    #############################################
    context "Test Falkorlib errors" do

        exceptions = [
                      FalkorLib::Exit,
                      FalkorLib::FalkorError,
                      FalkorLib::ExecError,
                      FalkorLib::InternalError,
                      FalkorLib::ArgumentError,
                      FalkorLib::AbortError,
                      FalkorLib::TemplateNotFound
                     ]
        exceptions.each do |e|
            it "##{e} -- exit code #{exceptions.index(e)}" do
                expect { raise e }.to raise_error
                begin
                    raise e
                rescue StandardError => s
                    i = s.status_code
                    expect(i).to eq(exceptions.index(e))
                end
            end
        end
    end


end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
falkorlib-0.9.1 spec/falkorlib/error_spec.rb
falkorlib-0.9.0 spec/falkorlib/error_spec.rb
falkorlib-0.8.10 spec/falkorlib/error_spec.rb
falkorlib-0.8.9 spec/falkorlib/error_spec.rb
falkorlib-0.8.8 spec/falkorlib/error_spec.rb
falkorlib-0.8.7 spec/falkorlib/error_spec.rb
falkorlib-0.8.6 spec/falkorlib/error_spec.rb
falkorlib-0.8.5 spec/falkorlib/error_spec.rb
falkorlib-0.8.4 spec/falkorlib/error_spec.rb
falkorlib-0.8.3 spec/falkorlib/error_spec.rb
falkorlib-0.8.2 spec/falkorlib/error_spec.rb
falkorlib-0.8.1 spec/falkorlib/error_spec.rb
falkorlib-0.7.18 spec/falkorlib/error_spec.rb
falkorlib-0.7.17 spec/falkorlib/error_spec.rb
falkorlib-0.7.16 spec/falkorlib/error_spec.rb
falkorlib-0.7.15 spec/falkorlib/error_spec.rb
falkorlib-0.7.14 spec/falkorlib/error_spec.rb
falkorlib-0.7.13 spec/falkorlib/error_spec.rb
falkorlib-0.7.11 spec/falkorlib/error_spec.rb
falkorlib-0.7.9 spec/falkorlib/error_spec.rb