Yes, a pair of bar magnets with keepers on two ends will act as a magnet. A keeper is a soft iron or steel piece which when kept across the poles of the magnet behaves like a temporary magnet. It helps in conserving the magnetism of the magnets by providing an uninterrupted path for the magnetic field lines to form a loop. Since, there is magnetic field, a pair of magnets with stoppers will act as magnets also.