Sha256: 009e103cdfda22c3f4b0b12e9068ce424f685fc93afcbd8554772083a36200d1

Contents?: true

Size: 311 Bytes

Versions: 2

Compression:

Stored size: 311 Bytes

Contents

module ActiveRecord # :nodoc:
  class Base
    
    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
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
not_a_mock-1.0.1 lib/not_a_mock/active_record_extensions.rb
not_a_mock-1.0.0 lib/not_a_mock/active_record_extensions.rb