lib/surrogate/rspec/substitution_matcher.rb in surrogate-0.7.0 vs lib/surrogate/rspec/substitution_matcher.rb in surrogate-0.8.0

- old
+ new

@@ -13,11 +13,11 @@ @comparison = ApiComparer.new(surrogate, @original_class).compare comparing_fields(@comparison, @subset_only, @types, @names).values.inject(:+).empty? end - def failure_message_for_should + def failure_message extra_instance_methods = @comparison[:instance][:not_on_actual ].to_a # these come in as sets extra_class_methods = @comparison[:class ][:not_on_actual ].to_a missing_instance_methods = @comparison[:instance][:not_on_surrogate].to_a missing_class_methods = @comparison[:class ][:not_on_surrogate].to_a instance_type_mismatch = @comparison[:instance][:types ] @@ -42,10 +42,10 @@ class_type_mismatch.each { |method_name, param_names| differences << ".#{method_name} had parameter names #{param_names.inspect}" } end "Was not substitutable because surrogate " << differences.join("\n") end - def failure_message_for_should_not + def failure_message_when_negated "Should not have been substitute, but was" end private