Module: RSpec
- Defined in:
- lib/rspec/matchers.rb,
lib/rspec/matchers.rb,
lib/rspec/expectations.rb,
lib/rspec/matchers/dsl.rb,
lib/rspec/matchers/pretty.rb,
lib/rspec/matchers/matcher.rb,
lib/rspec/matchers/be_close.rb,
lib/rspec/matchers/built_in.rb,
lib/rspec/expectations/differ.rb,
lib/rspec/expectations/errors.rb,
lib/rspec/expectations/syntax.rb,
lib/rspec/expectations/handler.rb,
lib/rspec/expectations/version.rb,
lib/rspec/matchers/built_in/be.rb,
lib/rspec/matchers/built_in/eq.rb,
lib/rspec/matchers/built_in/eql.rb,
lib/rspec/matchers/built_in/has.rb,
lib/rspec/expectations/fail_with.rb,
lib/rspec/matchers/built_in/have.rb,
lib/rspec/matchers/configuration.rb,
lib/rspec/matchers/built_in/cover.rb,
lib/rspec/matchers/built_in/equal.rb,
lib/rspec/matchers/built_in/exist.rb,
lib/rspec/matchers/built_in/match.rb,
lib/rspec/matchers/built_in/yield.rb,
lib/rspec/matchers/method_missing.rb,
lib/rspec/expectations/deprecation.rb,
lib/rspec/matchers/built_in/change.rb,
lib/rspec/matchers/built_in/include.rb,
lib/rspec/matchers/built_in/satisfy.rb,
lib/rspec/matchers/operator_matcher.rb,
lib/rspec/matchers/built_in/be_within.rb,
lib/rspec/matchers/built_in/be_kind_of.rb,
lib/rspec/matchers/built_in/respond_to.rb,
lib/rspec/matchers/built_in/match_array.rb,
lib/rspec/matchers/built_in/raise_error.rb,
lib/rspec/expectations/extensions/object.rb,
lib/rspec/matchers/built_in/base_matcher.rb,
lib/rspec/matchers/built_in/throw_symbol.rb,
lib/rspec/expectations/expectation_target.rb,
lib/rspec/matchers/generated_descriptions.rb,
lib/rspec/matchers/built_in/be_instance_of.rb,
lib/rspec/matchers/built_in/start_and_end_with.rb,
lib/rspec/matchers/extensions/instance_eval_with_args.rb
Defined Under Namespace
Modules: Expectations, Matchers
Class Method Summary collapse
-
.deprecate(method, alternate_method = nil, version = nil) ⇒ Object
Used internally by RSpec to display standard deprecation warnings.
-
.warn_deprecation(message) ⇒ Object
Used internally by RSpec to display custom deprecation warnings.
Class Method Details
.deprecate(method, alternate_method = nil, version = nil) ⇒ Object
Used internally by RSpec to display standard deprecation warnings. This is also defined in rspec-core, but we can't assume it's loaded since rspec-expectations should be usable w/o rspec-core.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rspec/expectations/deprecation.rb', line 7 def deprecate(method, alternate_method=nil, version=nil) version_string = version ? "rspec-#{version}" : "a future version of RSpec" = <<-NOTICE ***************************************************************** DEPRECATION WARNING: you are using deprecated behaviour that will be removed from #{version_string}. #{caller(0)[2]} * #{method} is deprecated. NOTICE if alternate_method << <<-ADDITIONAL * please use #{alternate_method} instead. ADDITIONAL end << "*****************************************************************" warn_deprecation() end |
.warn_deprecation(message) ⇒ Object
Used internally by RSpec to display custom deprecation warnings. This is also defined in rspec-core, but we can't assume it's loaded since rspec-expectations should be usable w/o rspec-core.
33 34 35 |
# File 'lib/rspec/expectations/deprecation.rb', line 33 def warn_deprecation() send :warn, end |