Sha256: add18df4b083ef1471b254365a35da260e5e08a09199c994fe1ae8037ce9bf80

Contents?: true

Size: 1012 Bytes

Versions: 34

Compression:

Stored size: 1012 Bytes

Contents

require "appsignal/integrations/resque"

describe "Legacy Resque integration" do
  let(:err_stream) { std_stream }
  let(:stderr) { err_stream.read }
  let(:log_stream) { std_stream }
  let(:log) { log_contents(log_stream) }

  it "logs and prints a deprecation message on extend" do
    Appsignal.logger = test_logger(log_stream)

    capture_std_streams(std_stream, err_stream) do
      Class.new do
        extend Appsignal::Integrations::ResquePlugin
      end
    end

    deprecation_message =
      "The AppSignal ResquePlugin is deprecated and does " \
      "nothing on extend. In this version of the AppSignal Ruby gem " \
      "the integration with Resque is automatic on all Resque workers. " \
      "Please remove the following line from this file to remove this " \
      "message: extend Appsignal::Integrations::ResquePlugin\n" \
      "#{__FILE__}:"
    expect(stderr).to include "appsignal WARNING: #{deprecation_message}"
    expect(log).to contains_log :warn, deprecation_message
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
appsignal-2.11.10-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.10 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.9-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.9 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.8-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.8 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.7 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.7-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.6 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.6-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.5-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.5 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.4-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.4 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.3-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.3 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.2-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.2 spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.1-java spec/lib/appsignal/integrations/resque_spec.rb
appsignal-2.11.1 spec/lib/appsignal/integrations/resque_spec.rb