lib/surrogate/rspec.rb in surrogate-0.4.3 vs lib/surrogate/rspec.rb in surrogate-0.5.0

- old
+ new

@@ -15,11 +15,34 @@ def rspec_mocks_loaded=(bool) @alrady_checked_mocks = true @mocks_loaded = bool end end + + module Matchers + def have_been_told_to(expected) + HaveBeenToldTo.new expected + end + + def have_been_asked_for_its(expected) + HaveBeenAskedForIts.new expected + end + + def have_been_initialized_with(*initialization_args, &block) + HaveBeenInitializedWith.new *initialization_args, &block + end + end end end +require 'rspec/core' require 'surrogate' -require 'surrogate/rspec/api_method_matchers' -require 'surrogate/rspec/substitutability_matchers' +require 'surrogate/rspec/substitute_for' + +require 'surrogate/rspec/have_been_asked_for_its' +require 'surrogate/rspec/have_been_initialized_with' +require 'surrogate/rspec/have_been_told_to' + + +RSpec.configure do |config| + config.include Surrogate::RSpec::Matchers +end