Sha256: 8ae56a838098e73b23578d3b2419711aceaafaaabc4704aae6fed4f62cd5cc40

Contents?: true

Size: 605 Bytes

Versions: 11

Compression:

Stored size: 605 Bytes

Contents

require 'test_helper'

class RackTest < ActiveSupport::TestCase

  setup do
    @pass_app = Object.new
    @pass_app.stubs(:call).returns([nil, { 'X-Cascade' => 'pass' }, nil])
  end

  test "should ignore \"X-Cascade\" header by default" do
    ExceptionNotifier.expects(:notify_exception).never
    ExceptionNotification::Rack.new(@pass_app).call({})
  end

  test "should notify on \"X-Cascade\" = \"pass\" if ignore_cascade_pass option is false" do
    ExceptionNotifier.expects(:notify_exception).once
    ExceptionNotification::Rack.new(@pass_app, :ignore_cascade_pass => false).call({})
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
exception_notification-4.2.1 test/exception_notification/rack_test.rb
exception_notification-4.2.0 test/exception_notification/rack_test.rb
exception_notification-4.2.0.rc1 test/exception_notification/rack_test.rb
exception_notification_more_info-1.0.1 test/exception_notification/rack_test.rb
exception_notification_more_info-1.0.0 test/exception_notification/rack_test.rb
exception_notification-4.1.4 test/exception_notification/rack_test.rb
exception_notification-4.1.3 test/exception_notification/rack_test.rb
exception_notification-4.1.2 test/exception_notification/rack_test.rb
exception_notification-4.1.1 test/exception_notification/rack_test.rb
exception_notification-4.1.0 test/exception_notification/rack_test.rb
exception_notification-4.1.0.rc2 test/exception_notification/rack_test.rb