Sha256: 2c2c3575be73f67005c39271819a4875565e6981086896f00881c39b5e39be31

Contents?: true

Size: 950 Bytes

Versions: 30

Compression:

Stored size: 950 Bytes

Contents

describe Appsignal::Probes::MriProbe do
  let(:probe) { described_class.new }

  describe ".dependencies_present?" do
    if DependencyHelper.running_jruby? || DependencyHelper.running_ruby_2_0?
      it "should not be present" do
        expect(described_class.dependencies_present?).to be_falsy
      end
    else
      it "should be present" do
        expect(described_class.dependencies_present?).to be_truthy
      end
    end
  end

  unless DependencyHelper.running_jruby? || DependencyHelper.running_ruby_2_0?
    describe "#call" do
      it "should track vm metrics" do
        expect_distribution_value(:class_serial)
        expect_distribution_value(:global_constant_state)

        probe.call
      end
    end

    def expect_distribution_value(metric)
      expect(Appsignal).to receive(:add_distribution_value)
        .with("ruby_vm", kind_of(Numeric), :metric => metric)
        .and_call_original
        .once
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
appsignal-3.0.27-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.27 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.26-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.26 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.25-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.25 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.24-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.24 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.23-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.23 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.22-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.22 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.21-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.21 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.21.alpha.1-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.21.alpha.1 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.20-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.20 spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.19-java spec/lib/appsignal/probes/mri_spec.rb
appsignal-3.0.19 spec/lib/appsignal/probes/mri_spec.rb