Class: ActiveRecord::Base
- Defined in:
- lib/not_a_mock/active_record_extensions.rb
Class Method Summary collapse
Class Method Details
.stub_instance(methods = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/not_a_mock/active_record_extensions.rb', line 4 def self.stub_instance(methods = {}) @@__stub_object_id ||= 1000 @@__stub_object_id += 1 methods = methods.merge(:id => @@__stub_object_id, :to_param => @@__stub_object_id.to_s) NotAMock::Stub.new(self, methods) end |