Sha256: 4a650857a48601ff14b66344430645d4a0f9faf32c2e40ff531715cb32109037

Contents?: true

Size: 752 Bytes

Versions: 20

Compression:

Stored size: 752 Bytes

Contents

describe Appsignal::Hooks::DataMapperHook do
  context "with datamapper" do
    before :all do
      module DataMapper
      end
      module DataObjects
        class Connection
        end
      end
      Appsignal::Hooks::DataMapperHook.new.install
    end

    after :all do
      Object.send(:remove_const, :DataMapper)
      Object.send(:remove_const, :DataObjects)
    end

    its(:dependencies_present?) { should be_true }

    it "should install the listener" do
      expect(::DataObjects::Connection).to receive(:include)
        .with(Appsignal::Hooks::DataMapperLogListener)

      Appsignal::Hooks::DataMapperHook.new.install
    end
  end

  context "without datamapper" do
    its(:dependencies_present?) { should be_false }
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
appsignal-2.0.6 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.1.0.beta.1 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.0.5 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.0.5.beta.1 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.1.0.alpha.3 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.1.0.alpha.2 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.1.0.alpha.1 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.0.4 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.0.3 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.0.2 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.0.1 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.0.0 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-2.0.0.beta.1 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-1.4.0.beta.1 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-1.3.6 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-1.3.6.beta.1 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-1.3.5 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-1.3.5.beta.1 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-1.3.4 spec/lib/appsignal/hooks/data_mapper_spec.rb
appsignal-1.3.3 spec/lib/appsignal/hooks/data_mapper_spec.rb