Sha256: 79c8c7266d446c38050b6a078a574700670b66a03f53e56e3a1f474fefefb69d
Contents?: true
Size: 750 Bytes
Versions: 10
Compression:
Stored size: 750 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper.rb' module Spec module Mocks describe "AnyNumberOfTimes" do before(:each) do @mock = Mock.new("test mock") end it "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 end it "should pass if any number of times method is called once" do @mock.should_receive(:random_call).any_number_of_times @mock.random_call end it "should pass if any number of times method is not called" do @mock.should_receive(:random_call).any_number_of_times end end end end
Version data entries
10 entries across 10 versions & 1 rubygems