Sha256: b266b6dbec1491aa7d92bd5268fb0e9f2e910a0562b8068362e5a2baef0f870c

Contents?: true

Size: 595 Bytes

Versions: 24

Compression:

Stored size: 595 Bytes

Contents

require "spec_helper"

describe Lita::Handlers::DeprecationCheck, lita_handler: true do
  it { is_expected.to route_event(:loaded).to(:check_handlers_for_default_config) }

  describe "#check_handlers_for_default_config" do
    before do
      registry.register_handler(:foo) do
        def self.default_config(old_config)
          old_config.bar = :baz
        end
      end
    end

    it "logs a warning for handlers using the default_config method" do
      expect(Lita.logger).to receive(:warn).with(/found defined in the foo handler/)

      robot.trigger(:loaded, {})
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
lita-4.8.0 spec/lita/handlers/deprecation_check_spec.rb
lita-4.8.0.beta1 spec/lita/handlers/deprecation_check_spec.rb
lita-4.7.1 spec/lita/handlers/deprecation_check_spec.rb
lita-4.7.0 spec/lita/handlers/deprecation_check_spec.rb
lita-4.6.1 spec/lita/handlers/deprecation_check_spec.rb
lita-4.6.0 spec/lita/handlers/deprecation_check_spec.rb
lita-4.5.0 spec/lita/handlers/deprecation_check_spec.rb
lita-4.4.3 spec/lita/handlers/deprecation_check_spec.rb
lita-4.4.2 spec/lita/handlers/deprecation_check_spec.rb
lita-4.4.1 spec/lita/handlers/deprecation_check_spec.rb
lita-4.4.0 spec/lita/handlers/deprecation_check_spec.rb
lita-4.3.2 spec/lita/handlers/deprecation_check_spec.rb
lita-4.3.1 spec/lita/handlers/deprecation_check_spec.rb
lita-4.3.0 spec/lita/handlers/deprecation_check_spec.rb
lita-4.2.1 spec/lita/handlers/deprecation_check_spec.rb
lita-4.2.0 spec/lita/handlers/deprecation_check_spec.rb
lita-4.1.0 spec/lita/handlers/deprecation_check_spec.rb
lita-4.0.4 spec/lita/handlers/deprecation_check_spec.rb
lita-4.0.3 spec/lita/handlers/deprecation_check_spec.rb
lita-4.0.2 spec/lita/handlers/deprecation_check_spec.rb