Method: Spec::Rails::Mocks#add_stubs
- Defined in:
- lib/spec/rails/mocks.rb
#add_stubs(object, stubs = {}) ⇒ Object
DEPRECATED - use object.stub!(:method => value, :method2 => value)
Stubs methods on object (if object is a symbol or string a new mock with that name will be created). stubs is a Hash of method=>value
116 117 118 119 120 121 122 123 124 125 |
# File 'lib/spec/rails/mocks.rb', line 116 def add_stubs(object, stubs = {}) #:nodoc: Kernel.warn "DEPRECATION NOTICE: add_stubs is deprecated and will be removed\nfrom a future version of rspec-rails. Use this instead:\n \n object.stub!(:method => value, :method2 => value)\n \n" object.stub!(stubs) end |