Module: Spec

Defined in:
lib/vendor/plugins/rspec/lib/spec/version.rb,
lib/vendor/plugins/rspec/lib/spec/ruby.rb,
lib/vendor/plugins/rspec/lib/spec/mocks.rb,
lib/vendor/plugins/rspec/lib/spec/runner.rb,
lib/vendor/plugins/rspec/lib/spec/example.rb,
lib/vendor/plugins/rspec/spec/spec_helper.rb,
lib/vendor/plugins/rspec/spec/spec_helper.rb,
lib/vendor/plugins/rspec/lib/spec/dsl/main.rb,
lib/vendor/plugins/rspec/lib/spec/matchers.rb,
lib/vendor/plugins/rspec/lib/spec/test/unit.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/mock.rb,
lib/vendor/plugins/rspec/lib/spec/deprecation.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/be.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/proxy.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/space.rb,
lib/vendor/plugins/rspec/lib/spec/expectations.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/dsl.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/eql.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/has.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/errors.rb,
lib/vendor/plugins/rspec/spec/spec/runner_spec.rb,
lib/vendor/plugins/rspec-rails/spec/spec_helper.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/have.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/methods.rb,
lib/vendor/plugins/rspec/lib/spec/rake/spectask.rb,
lib/vendor/plugins/rspec/lib/spec/example/errors.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/equal.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/exist.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/match.rb,
lib/vendor/plugins/rspec/lib/spec/runner/options.rb,
lib/vendor/plugins/rspec/spec/spec/dsl/main_spec.rb,
lib/vendor/plugins/rspec/lib/spec/example/pending.rb,
lib/vendor/plugins/rspec/lib/spec/example/subject.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/change.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/errors.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/pretty.rb,
lib/vendor/plugins/rspec/lib/spec/runner/reporter.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/include.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/matcher.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/satisfy.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/mock_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/stub_spec.rb,
lib/vendor/plugins/rspec/spec/support/spec_classes.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/mocks.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/be_close.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/order_group.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/dsl_spec.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/unstub_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/version.rb,
lib/vendor/plugins/rspec/lib/spec/expectations/errors.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/be_kind_of.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/respond_to.rb,
lib/vendor/plugins/rspec/lib/spec/runner/command_line.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/have_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/at_most_spec.rb,
lib/vendor/plugins/rspec/spec/spec/rake/spectask_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers.rb,
lib/vendor/plugins/rspec/lib/spec/expectations/handler.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/match_array.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/raise_error.rb,
lib/vendor/plugins/rspec/lib/spec/runner/configuration.rb,
lib/vendor/plugins/rspec/lib/spec/runner/heckle_runner.rb,
lib/vendor/plugins/rspec/lib/spec/runner/option_parser.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/equal_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/at_least_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/options_spec.rb,
lib/vendor/plugins/rspec/lib/spec/example/example_group.rb,
lib/vendor/plugins/rspec/lib/spec/example/example_proxy.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/throw_symbol.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/error_generator.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/example_methods.rb,
lib/vendor/plugins/rspec/spec/spec/example/subject_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/reporter_spec.rb,
lib/vendor/plugins/rspec/lib/spec/expectations/fail_with.rb,
lib/vendor/plugins/rspec/lib/spec/runner/differs/default.rb,
lib/vendor/plugins/rspec/spec/autotest/autotest_matchers.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/matcher_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/mock_space_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/stub_chain_spec.rb,
lib/vendor/plugins/rspec/lib/spec/example/example_matcher.rb,
lib/vendor/plugins/rspec/lib/spec/example/example_methods.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/be_instance_of.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/method_missing.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/simple_matcher.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/argument_matchers.rb,
lib/vendor/plugins/rspec/lib/spec/runner/drb_command_line.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/be_close_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/once_counts_spec.rb,
lib/vendor/plugins/rspec/lib/spec/example/args_and_options.rb,
lib/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb,
lib/vendor/plugins/rspec/lib/spec/runner/line_number_query.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/options_hash_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/partial_mock_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/twice_counts_spec.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/operator_matcher.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/wrap_expectation.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/be_kind_of_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/mock_ordering_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/command_line_spec.rb,
lib/vendor/plugins/rspec/lib/spec/example/predicate_matchers.rb,
lib/vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb,
lib/vendor/plugins/rspec/spec/spec/expectations/handler_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/bug_report_830_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/precise_counts_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/configuration_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers/change.rb,
lib/vendor/plugins/rspec/lib/spec/adapters/mock_frameworks/rr.rb,
lib/vendor/plugins/rspec/lib/spec/example/example_group_proxy.rb,
lib/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_group_spec.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_proxy_spec.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/throw_symbol_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/record_messages_spec.rb,
lib/vendor/plugins/rspec/lib/spec/example/module_reopening_fix.rb,
lib/vendor/plugins/rspec/lib/spec/example/shared_example_group.rb,
lib/vendor/plugins/rspec/spec/spec/example/pending_module_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/bug_report_15719_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/null_object_mock_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/output_one_time_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers/route_to.rb,
lib/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb,
lib/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_matcher_spec.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_methods_spec.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/be_instance_of_spec.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/simple_matcher_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/argument_matchers_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/drb_command_line_spec.rb,
lib/vendor/plugins/make_resourceful/spec/rspec-rails/redirect_to.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers/have_text.rb,
lib/vendor/plugins/rspec/lib/spec/adapters/mock_frameworks/mocha.rb,
lib/vendor/plugins/rspec/lib/spec/adapters/mock_frameworks/rspec.rb,
lib/vendor/plugins/rspec/lib/spec/example/before_and_after_hooks.rb,
lib/vendor/plugins/rspec/spec/spec/matchers/matcher_methods_spec.rb,
lib/vendor/plugins/rspec/lib/spec/example/example_group_hierarchy.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/generated_descriptions.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/base_formatter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/html_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/example/predicate_matcher_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/any_number_of_times_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/stub_implementation_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers/ar_be_valid.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers/redirect_to.rb,
lib/vendor/plugins/rspec/lib/spec/runner/heckle_runner_unsupported.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/argument_expectation_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/cookies_proxy.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers/include_text.rb,
lib/vendor/plugins/rspec/lib/spec/adapters/mock_frameworks/flexmock.rb,
lib/vendor/plugins/rspec/lib/spec/matchers/extensions/instance_exec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/class_and_arguments_parser.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/silent_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_group_proxy_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/multiple_return_value_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/example_group_runner_spec.rb,
lib/vendor/plugins/make_resourceful/spec/rspec-rails/render_template.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers/assert_select.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/profile_formatter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/snippet_extractor.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/example/nested_example_group_spec.rb,
lib/vendor/plugins/rspec/spec/spec/example/shared_example_group_spec.rb,
lib/vendor/plugins/rspec/spec/spec/expectations/differs/default_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/hash_including_matcher_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/render_observer.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/routing_helpers.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_group_factory_spec.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_group_methods_spec.rb,
lib/vendor/plugins/rspec/spec/spec/expectations/wrap_expectation_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/nil_expectation_warning_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/matchers/render_template.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/base_text_formatter.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/text_mate_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/runner/noisy_backtrace_tweaker_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/quiet_backtrace_tweaker_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/no_op_method_missing.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/failing_argument_matchers_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/passing_argument_matchers_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/base_formatter_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/assigns_hash_proxy.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/view_example_group.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/nested_text_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/hash_not_including_matcher_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/class_and_argument_parser_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/model_example_group.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/configuration_spec.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/cookies_proxy_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/progress_bar_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/example/subclassing_example_group_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/helper_example_group.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/stubbed_message_expectations_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/profile_formatter_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/specdoc_formatter_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/routing_example_group.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/active_record/base.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/spec/matchers/have.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/base_text_formatter_spec.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/failing_examples_formatter.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/controller_example_group.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/functional_example_group.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/view_example_group_spec.rb,
lib/vendor/plugins/rspec/spec/spec/example/example_group_class_definition_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/nested_text_formatter_spec.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/model_example_group_spec.rb,
lib/vendor/plugins/rspec/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/progress_bar_formatter_spec.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/helper_example_group_spec.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/helper_example_group_spec.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/example_group_factory_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/spec/runner/configuration.rb,
lib/vendor/plugins/rspec/lib/spec/runner/formatter/failing_example_groups_formatter.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb,
lib/vendor/plugins/rspec-rails/spec/spec/rails/example/controller_example_group_spec.rb,
lib/vendor/plugins/rspec/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb,
lib/vendor/plugins/rspec-rails/lib/spec/rails/example/integration_example_group.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Adapters, DSL, Example, Expectations, Fixtures, Matchers, Mocks, Rails, Rake, Ruby, Runner, Test, VERSION Classes: HashWithDeprecationNotice

Class Method Summary collapse

Class Method Details

.deprecate(method, alternate_method = nil) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/vendor/plugins/rspec/lib/spec/deprecation.rb', line 3

def deprecate(method, alternate_method=nil)
   message = <<-NOTICE

*****************************************************************
DEPRECATION WARNING: you are using deprecated behaviour that will
be removed from a future version of RSpec.

#{caller(0)[2]}

* #{method} is deprecated.
NOTICE
  if alternate_method
    message << <<-ADDITIONAL
* please use #{alternate_method} instead.
ADDITIONAL
  end

  message << "*****************************************************************"
  warn(message)
end

.warn(message) ⇒ Object



24
25
26
# File 'lib/vendor/plugins/rspec/lib/spec/deprecation.rb', line 24

def warn(message)
  Kernel.warn(message)
end