3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/deep_test/rspec_detector.rb', line 3
def self.if_rspec_available
require "rubygems"
require "spec/version"
if defined?(::Spec)
if ::Spec::VERSION::MAJOR >= 1 &&
::Spec::VERSION::MINOR >= 1 &&
::Spec::VERSION::TINY >= 3
yield
else
require 'spec/rake/spectask'
::Spec::Rake::SpecTask.class_eval do
def deep_test(options)
raise "* DeepTest RSpec support requires RSpec 1.1.3 or greater"
end
end
end
end
rescue LoadError, Gem::LoadError
end
|