Sha256: 55807a8f28851deb7f2ca99d9ffa6a9033ca43e13de1ead77ed11bf054e14558
Contents?: true
Size: 858 Bytes
Versions: 4
Compression:
Stored size: 858 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper.rb' module Spec module Mocks context "AnyNumberOfTimes" do setup do @mock = Mock.new("test mock", { :auto_verify => false }) end specify "should pass if any number of times method is called many times" do @mock.should_receive(:random_call).any_number_of_times (1..10).each do @mock.random_call end @mock.__verify end specify "should pass if any number of times method is called once" do @mock.should_receive(:random_call).any_number_of_times @mock.random_call @mock.__verify end specify "should pass if any number of times method is not called" do @mock.should_receive(:random_call).any_number_of_times @mock.__verify end end end end
Version data entries
4 entries across 4 versions & 2 rubygems