module RSpec::Expectations::Syntax
def enable_should(syntax_host=default_should_host)
- Api: - private
def enable_should(syntax_host=default_should_host) @warn_about_should = false if syntax_host == default_should_host return if should_enabled?(syntax_host) syntax_host.module_exec do def should(matcher=nil, message=nil, &block) ::RSpec::Expectations::Syntax.warn_about_should_unless_configured(::Kernel.__method__) ::RSpec::Expectations::PositiveExpectationHandler.handle_matcher(self, matcher, message, &block) end def should_not(matcher=nil, message=nil, &block) ::RSpec::Expectations::Syntax.warn_about_should_unless_configured(::Kernel.__method__) ::RSpec::Expectations::NegativeExpectationHandler.handle_matcher(self, matcher, message, &block) end end end