Sha256: 9ab48b9f75925b74b51cadebb33d302adb2a0215f3353440f442b91cce934a76

Contents?: true

Size: 432 Bytes

Versions: 3

Compression:

Stored size: 432 Bytes

Contents

module Spec
  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

3 entries across 3 versions & 1 rubygems

Version Path
picolena-0.1.6 rails_plugins/rspec/lib/spec/mocks/space.rb
picolena-0.1.7 rails_plugins/rspec/lib/spec/mocks/space.rb
picolena-0.1.8 rails_plugins/rspec/lib/spec/mocks/space.rb