Sha256: 8cc76ebeface75cb619cdeaca07ba7df23f50cf2eabb18fafc6fe56ed29f18b3

Contents?: true

Size: 852 Bytes

Versions: 2

Compression:

Stored size: 852 Bytes

Contents

if Pacer::Dex::ENABLED
  class RSpec::GraphRunner
    module Dex
      def all(usage_style = :read_write, indices = true, &block)
        super
        dex(usage_style, indices, &block)
      end

      def dex(usage_style = :read_write, indices = true, &block)
        for_graph('dex', usage_style, indices, false, dex_graph, dex_graph2, nil, block)
      end

      protected

      def dex_graph
        return @dex_graph if @dex_graph
        path1 = File.expand_path('tmp/spec.dex')
        dir = Pathname.new(path1)
        dir.rmtree if dir.exist?
        @dex_graph = Pacer.dex(path1)
      end

      def dex_graph2
        return @dex_graph2 if @dex_graph2
        path2 = File.expand_path('tmp/spec.dex.2')
        dir = Pathname.new(path2)
        dir.rmtree if dir.exist?
        @dex_graph2 = Pacer.dex(path2)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pacer-dex-2.0.0-java lib/pacer-dex/rspec.rb
pacer-dex-2.0.0.pre-java lib/pacer-dex/rspec.rb