Sha256: 66722a3ac61462dd97b9dd3532a31b2711a1669a5b6bd5864c340a0db1292617

Contents?: true

Size: 462 Bytes

Versions: 6

Compression:

Stored size: 462 Bytes

Contents

module RSpec
  module Mocks
    # @api private
    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

6 entries across 6 versions & 3 rubygems

Version Path
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-mocks-2.8.0/lib/rspec/mocks/space.rb
rspec-mocks-2.8.0 lib/rspec/mocks/space.rb
rspec-mocks-2.8.0.rc2 lib/rspec/mocks/space.rb