lib/remarkable/pending.rb in remarkable-3.1.3 vs lib/remarkable/pending.rb in remarkable-3.1.4

- old
+ new

@@ -3,15 +3,17 @@ module Pending # We cannot put the alias method in the module because it's a Ruby 1.8 bug # http://coderrr.wordpress.com/2008/03/28/alias_methodmodule-bug-in-ruby-18/ # - def self.extended(base) #:nodoc: - class << base - alias_method :example_without_pending, :example - alias_method :example, :example_with_pending - alias :it :example - alias :specify :example + def self.extended(base) #:nodoc: + if base.respond_to?(:example) + class << base + alias_method :example_without_pending, :example + alias_method :example, :example_with_pending + alias :it :example + alias :specify :example + end end end # Adds a pending block to your specs. #