Sha256: 4f887c3ad3be719c388e3203d3f01234f189b493eecfd762a22c7945b53b66e2

Contents?: true

Size: 449 Bytes

Versions: 41

Compression:

Stored size: 449 Bytes

Contents

module RSpec
  module Mocks
    class Space
      def add(obj)
        mocks << obj unless mocks.detect {|m| m.equal? obj}
      end

      def verify_all
        mocks.each do |mock|
          mock.rspec_verify
        end
      end
      
      def reset_all
        mocks.each do |mock|
          mock.rspec_reset
        end
        mocks.clear
      end
      
    private
    
      def mocks
        @mocks ||= []
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 4 rubygems

Version Path
rspec-mocks-2.0.0.beta.9 lib/rspec/mocks/space.rb