Sha256: 60bf0747ed97b330a3499eb846dcacb2bc515c63f09e1997b6fb664e306ca22a

Contents?: true

Size: 407 Bytes

Versions: 5

Compression:

Stored size: 407 Bytes

Contents

require "spec_helper"

describe "Handlers::Exceptions" do
  it "always returns the same instance" do
    expect(Kharon::Handlers::Exceptions.instance).to be(Kharon::Handlers::Exceptions.instance)
  end

  context "#report_error" do
    it "raises an error of the right type" do
      expect{Kharon::Handlers::Exceptions.instance.report_error({})}.to raise_error(Kharon::Errors::Validation)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kharon-1.1.1 spec/lib/kharon/handlers/exceptions_spec.rb
kharon-1.1.0 spec/lib/kharon/handlers/exceptions_spec.rb
kharon-1.0.0 spec/lib/kharon/handlers/exceptions_spec.rb
kharon-0.5.1 spec/lib/kharon/handlers/exceptions_spec.rb
kharon-0.5.0 spec/lib/kharon/handlers/exceptions_spec.rb