lib/caricature/clr/isolation.rb in caricature-0.7.0 vs lib/caricature/clr/isolation.rb in caricature-0.7.1

- old
+ new

@@ -1,18 +1,9 @@ module Caricature class Isolation - def internal_create_override(method_name, mode=:instance, &block) - builder = ExpectationBuilder.new method_name - block.call builder unless block.nil? - exp = builder.build - - expectations.add_expectation exp, mode - exp - end - class << self # Creates an isolation object complete with proxy and method call recorder # It works out which isolation it needs to create and provide and initializes the # method call recorder @@ -32,11 +23,21 @@ # otherwise it will return a +ClrIsolator+ def get_clr_isolation_strategy(subject) return ClrInterfaceIsolator if subject.respond_to? :class_eval and !subject.respond_to? :new ClrIsolator end - end + end + protected + + def internal_create_override(method_name, mode=:instance, &block) + builder = ExpectationBuilder.new method_name + block.call builder unless block.nil? + exp = builder.build + + expectations.add_expectation exp, mode + exp + end end end \ No newline at end of file