lib/remarkable/matchers.rb in remarkable-3.1.13 vs lib/remarkable/matchers.rb in remarkable-4.0.0.alpha1
- old
+ new
@@ -10,18 +10,17 @@
# target as argument.
#
def self.include_matchers!(base, target=nil)
if target.nil?
if rspec_defined?
- target = Spec::Example::ExampleGroup
+ target = Rspec::Matchers
else
- raise ArgumentError, "You haven't supplied the target to include_matchers! and RSpec is not loaded, so we cannot infer one."
+ raise ArgumentError, "You haven't supplied the target to include_matchers! and Rspec is not loaded, so we cannot infer one."
end
end
metaclass = (class << target; self; end)
- target.send :extend, Remarkable::Pending unless metaclass.ancestors.include?(Remarkable::Pending)
target.send :extend, Remarkable::Macros unless metaclass.ancestors.include?(Remarkable::Macros)
if defined?(base::Matchers)
target.send :include, base::Matchers
@@ -33,8 +32,8 @@
base.after_include(target)
end
end
def self.rspec_defined? #:nodoc:
- defined?(Spec)
+ defined?(Rspec)
end
end