Sha256: 40af883d762c5661ca158e75068aab702272742360c0cfc49b01574c06b17221

Contents?: true

Size: 743 Bytes

Versions: 1

Compression:

Stored size: 743 Bytes

Contents

module YourBase
  module RSpec
    module Skipper 
      @@injected = false

      def self.inject!
        unless @@injected
          ::YourBase::RSpec::Skipper.init!
          @@injected = true
        end
      end

    end
  end
end

begin
  using_rspec = false

  begin 
    require 'rspec/core'
    using_rspec = true
  rescue LoadError => e
    puts "YourBase can't accelerate RSpec because it's not loaded!"
    return
  end

  begin
    puts "Loading YourBase RSpec Skipper..."
    require 'yourbase_test_skipper'
    ::YourBase::RSpec::Skipper.inject!
  rescue LoadError => e
    puts "Failed to find or load RSpec accelerator, falling back to normal behavior"
  end

rescue => e
  puts "Unable to load RSpec accelerator: #{e}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yourbase-rspec-skipper-0.1.9 lib/yourbase/rspec/skipper.rb