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
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-mocks-2.5.0/lib/rspec/mocks/space.rb
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-mocks-2.5.0/lib/rspec/mocks/space.rb
rspec-mocks-2.5.0 lib/rspec/mocks/space.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/space.rb
rspec-mocks-2.4.0 lib/rspec/mocks/space.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/space.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/space.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/space.rb
rspec-mocks-2.3.0 lib/rspec/mocks/space.rb
vim-jar-0.0.3 bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/space.rb
vim-jar-0.0.2 bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/space.rb
vim-jar-0.0.1 bundler/ruby/1.8/gems/rspec-mocks-2.1.0/lib/rspec/mocks/space.rb
rspec-mocks-2.2.0 lib/rspec/mocks/space.rb
rspec-mocks-2.1.0 lib/rspec/mocks/space.rb
rspec-mocks-2.0.1 lib/rspec/mocks/space.rb
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.4.1 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.4.0 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.3.2 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb
gemrage-0.3.1 vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb