Sha256: eaed57d6b4f7c2e09dd0de4ff787829d9d3a7b9b1ca9067258629ca4cec6a54a

Contents?: true

Size: 794 Bytes

Versions: 20

Compression:

Stored size: 794 Bytes

Contents

require 'spec_helper'

describe Errplane do
  describe ".ignorable_exception?" do
    it "should be true for exception types specified in the configuration" do
      class DummyException < Exception; end
      exception = DummyException.new

      Errplane.configure do |config|
        config.ignored_exceptions << 'DummyException'
      end

      Errplane.ignorable_exception?(exception).should be_true
    end

    it "should be true for exception types specified in the configuration" do
      exception = ActionController::RoutingError.new("foo")
      Errplane.ignorable_exception?(exception).should be_true
    end

    it "should be false for valid exceptions" do
      exception = ZeroDivisionError.new
      Errplane.ignorable_exception?(exception).should be_false
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
errplane-0.2.7 spec/unit/errplane_spec.rb
errplane-0.2.6 spec/unit/errplane_spec.rb
errplane-0.2.5 spec/unit/errplane_spec.rb
errplane-0.2.4 spec/unit/errplane_spec.rb
errplane-0.2.3 spec/unit/errplane_spec.rb
errplane-0.2.0 spec/unit/errplane_spec.rb
errplane-0.1.9 spec/unit/errplane_spec.rb
errplane-0.1.8 spec/unit/errplane_spec.rb
errplane-0.1.7 spec/unit/errplane_spec.rb
errplane-0.1.6 spec/unit/errplane_spec.rb
errplane-0.1.5 spec/unit/errplane_spec.rb
errplane-0.1.4 spec/unit/errplane_spec.rb
errplane-0.1.3 spec/unit/errplane_spec.rb
errplane-0.1.2 spec/unit/errplane_spec.rb
errplane-0.1.1 spec/unit/errplane_spec.rb
errplane-0.1.0 spec/unit/errplane_spec.rb
errplane-0.0.6 spec/unit/errplane_spec.rb
errplane-0.0.5 spec/unit/errplane_spec.rb
errplane-0.0.4 spec/unit/errplane_spec.rb
errplane-0.0.3 spec/unit/errplane_spec.rb