Sha256: 367180cc0f120769a563bae03ee259028eae3c41387bf0b4a1a0813749c0377e

Contents?: true

Size: 278 Bytes

Versions: 2

Compression:

Stored size: 278 Bytes

Contents

module DeepTest
  class RSpecDetector
    def self.if_rspec_available
      begin
        require 'rubygems'
      rescue LoadError
      else
        begin
          gem 'rspec'
        rescue Gem::LoadError
        else
          yield
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
deep_test-1.1.3 lib/deep_test/rspec_detector.rb
deep_test-1.1.4 lib/deep_test/rspec_detector.rb