Sha256: a57a56762f974bf26a511b367225d958bdf4de0a154b21c76880b21e5546ff11

Contents?: true

Size: 435 Bytes

Versions: 10

Compression:

Stored size: 435 Bytes

Contents

module Spec
  module Mocks
    class Space
      def add(obj)
        mocks << obj unless mocks.include?(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

10 entries across 10 versions & 1 rubygems

Version Path
rspec-1.0.3 lib/spec/mocks/space.rb
rspec-0.9.0 lib/spec/mocks/space.rb
rspec-0.9.1 lib/spec/mocks/space.rb
rspec-0.9.2 lib/spec/mocks/space.rb
rspec-0.9.3 lib/spec/mocks/space.rb
rspec-0.9.4 lib/spec/mocks/space.rb
rspec-1.0.0 lib/spec/mocks/space.rb
rspec-1.0.1 lib/spec/mocks/space.rb
rspec-1.0.2 lib/spec/mocks/space.rb
rspec-1.0.4 lib/spec/mocks/space.rb