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
gemrage-0.3.0 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.2.0 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.1.2 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.1.1 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.1.0 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.0.0 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
rspec-mocks-2.0.0 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.rc lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.22 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.20 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.19 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.18 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.17 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.16 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.15 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.14 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.13 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.12 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.11 lib/rspec/mocks/space.rb
rspec-mocks-2.0.0.beta.10 lib/rspec/mocks/space.rb