lib/rubanok/rspec.rb in rubanok-0.1.0 vs lib/rubanok/rspec.rb in rubanok-0.1.1
- old
+ new
@@ -27,10 +27,10 @@
def matches?(proc)
raise ArgumentError, "have_planished only supports block expectations" unless Proc === proc
raise ArgumentError, "Plane class is required. Please, specify it using `.with` modifier" if plane.nil?
- allow(plane).to receive(:call)
+ allow(plane).to receive(:call).and_call_original
proc.call
matcher.with(an_instance_of(data_class), anything) if data_class
matcher.matches?(plane)