lib/spec/api/sugar.rb in rspec-0.5.7 vs lib/spec/api/sugar.rb in rspec-0.5.8

- old
+ new

@@ -15,17 +15,17 @@ return object.__send__(calls.join("_"), *args, &block) end __orig_method_missing(sym, *args, &block) end - def __is_sweetened? sym + def __is_sweetened?(sym) #:nodoc: return true if sym.to_s =~ /^should_/ end end module MessageExpectationSugar - def __is_sweetened? sym + def __is_sweetened?(sym) #:nodoc: return true if sym.to_s =~ /^and_|^at_|^any_|^once_/ end end end end @@ -33,10 +33,10 @@ class Object #:nodoc: include Spec::Api::Sugar end class Spec::Api::Mock #:nodoc: - #NOTE: this resolves a bug caused by a conflict between Sugar#method_missing and Mock#method_missing, specifically + # NOTE: this resolves a bug caused by a conflict between Sugar#method_missing and Mock#method_missing, specifically # when the mock is set null_object=>true. It would be nice to get rid of this. def should_receive(sym, &block) return receive(sym, &block) end end \ No newline at end of file