Class: RR::DoNotAllowCreator

Inherits:
Creator
  • Object
show all
Defined in:
lib/rr/do_not_allow_creator.rb

Overview

RR::DoNotAllowCreator uses RR::DoNotAllowCreator#method_missing to create a Scenario that expects never to be called.

The following example mocks method_name with arg1 and arg2 returning return_value.

do_not_allow(subject).method_name(arg1, arg2) { return_value }

The DoNotAllowCreator also supports a block sytnax.

do_not_allow(subject) do |m|
  m.method1 # Do not allow method1 with any arguments
  m.method2(arg1, arg2) # Do not allow method2 with arguments arg1 and arg2
  m.method3.with_no_args # Do not allow method3 with no arguments
end

Defined Under Namespace

Modules: InstanceMethods

Method Summary

Methods inherited from Creator

#initialize

Constructor Details

This class inherits a constructor from RR::Creator