Sha256: 524917be8bf17d6a8884f2934aac8daf1653d467f1a5af51e73554737db30779
Contents?: true
Size: 767 Bytes
Versions: 1
Compression:
Stored size: 767 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' using_rspec = true rescue LoadError => e puts "YourBase can't accelerate RSpec because it's not loaded!" end if using_rspec 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 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.7 | lib/yourbase/rspec/skipper.rb |